nivekuil/rip

Rip does not check if parent folders have the same name as deleted files

jeiang opened this issue · 0 comments

If a file was deleted, and an item with a parent that has the same path of that file was also deleted, rip fail to delete the file.

E.g., assuming graveyard is /trash and current folder is /:

$ touch item
$ rip item
$ mkdir item
$ touch item/file
$ rip item/file
error: Failed to bury file
caused by: Failed to move /item/file to /trash/item/file
caused by: Not a directory (os error 20)

rip will try to move file to /trash/item/file, but does not check if /trash/item exists and is a file.