rmapi icon indicating copy to clipboard operation
rmapi copied to clipboard

`mv` doesn't prevent moving a directory to a subdirectory of itself

Open cmars opened this issue 4 years ago • 1 comments

coreutils' mv will prevent this kind of thing, but rmapi seems to allow it. I've only tried this with empty directories in my account, but you can probably lose data this way by making it unreachable, be careful.

[/]>mkdir a
[/]>mkdir a/b
[/]>mv a a/b
[/]>ls

a is no longer accessible.

cmars avatar Mar 02 '21 19:03 cmars

nice finding! the data is not lost (the files are still on the device), but it is not visible to the client.

maybe the orphaned documents should be shown somewhere

ddvk avatar Mar 03 '21 16:03 ddvk