bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34713: Files vanishing when moving to different FS


From: Christoph Michelbach
Subject: bug#34713: Files vanishing when moving to different FS
Date: Mon, 4 Mar 2019 20:57:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

Hello, Bob

Thank you for your explanation. I understand what's going on and even looked at the part of the source code that causes the problem prior to filing the bug report.


Even if you don't consider it a bug, it's still unexpected behavior that could be avoided. I think that mv's behavior would be more logical if it only removed files that it copied prior to removal (simple solution to the problem without destroying user data) or also move files that appeared in the destination location during the copying process (emulating moving a directory within a file system better and not destroying user data).


In the first case, it should still try to remove directories after removing all files in them but adhere to the rule that non-empty directories cannot be deleted instead of simply emptying them of their content prior to deletion.


In the second case, it should attempt to delete the directory and if this fails because it is non-empty, copy the newly appeared files over to the destination.


I think that the second solution is better for the users as it emulates the behavior of a move operation within a file system. However, I see that the first solution is easier to implement. The current behavior of mv destroys user data which I think is highly unexpected behavior.


Christoph






reply via email to

[Prev in Thread] Current Thread [Next in Thread]