pharo-launcher
pharo-launcher copied to clipboard
Rename of image failed, folder was renamed in Pharo/images, but now not visible in list
Describe the bug
- I renamed an image using PharoLauncher, but something failed ("remove directory primitive failed"? I don't remember, there was a toast message I think, but I didn't catch it). Then PharoLauncher gave a red X box, and I quit it.
- Upon relaunching, the image was no longer in the list
- The folder (as renamed) is actually in the Pharo/images folder.
- I'm not sure if I need to import it. Importing warns me it will "move files" either way, so I didn't want to risk something happening to the image.
To Reproduce Steps to reproduce the behavior:
This is not something I can reproduce. I've tried renaming several times and it works.
Expected behavior Renaming to work as expect. If it fails, then I'd expect PharoLauncher to "discover" the image that is already in the Pharo/images directory.
Screenshots N.A.
Version information:
- OS: Windows 10
- Version: Pharo Launcher version: 2.2
Expected development cost N.A.
Additional context PharoLauncher had been open for many launchings of images, and a couple of deletions and renames. So maybe this is how one reproduces the error?
Thanks a lot @fuhrmanator This shows that the renaming process should be improved, maybe the renaming should do a copy and delete, and not a rename, so the image is never lost (better to have two than none :D)
Indeed copying could be better @tesonep. But even if a copy fails, it seems that PharoLauncher could still fail to recognize the copied directory inside the Pharo/images folder when a failure occurs, just as with the failed rename. I repeat that my image was properly renamed (its folder was), but PharoLauncher doesn't see it anymore inside the Pharo/images folder.
I have more info - I'm not 100% sure of what happened, but it looks like when renaming an image from A to B via PharoLauncher, there was a new B directory, but it contained the files A.changes
and A.image
. PharoLauncher doesn't see this image anymore because the directory and .image/.changes files have different names.
I'm still not sure how the rename failed, but at least I can see why PharoLauncher didn't see my image anymore, and I think I have fixed it by renaming the containing directory to A
(edit: using the Windows explorer to rename this time).