manyfold
manyfold copied to clipboard
Purge deletes non-empty folder
Describe the bug Purge deletes non-empty folder
To Reproduce Steps to reproduce the behavior:
- Create a folder
- Add a STL to the folder
- Scan
- Remove STL from the folder
- Scan
- Purging folder from "problems" deletes the folder and all of it's subdirectories, which may contain other models!
Expected behavior Purge the database entry for the folder, not its contents.
Oof, it shouldn't be doing that if there are other models in there! Thanks for flagging it up, I'll check.
I suspect that the purge button shouldn't be displayed if there are contained models; we check the delete button on the model itself and remove if it's not safe; it might be that the model purge isn't doing the same check. We should make that safer.
Wait, I misunderstood. Purging a missing file removes the whole folder and subdirectories??
I'm afraid I can't replicate this locally; can you provide any more details? Like, the exact contents of the model before purging, a screenshot of the button, etc?
Here's a better description of the issue: Given the following directory structure:
Armor
├── Shoes.stl
├── Shoulders
│ ├── 1.stl
│ ├── 2.stl
│ ├── 3.stl
├── Chest
│ ├── 1.stl
│ ├── 2.stl
│ ├── 3.stl
Delete or move Shoes.stl:
Armor
├── Shoulders
│ ├── 1.stl
│ ├── 2.stl
│ ├── 3.stl
├── Chest
│ ├── 1.stl
│ ├── 2.stl
│ ├── 3.stl
├── Feet
│ ├── Shoes.stl
The "Armor" model that contained Shoes.stl now appears as empty in issues and is given the option to "Purge". If you do purge, Shoulders, Chest, and Feet are deleted from disk(not ManyFold) and there's no other way to remove the Armor model.
Ah fantastic, I'll give that a try in order to reproduce it.
I've got this replicated now, should be fixed soon.