Some (including GNU mv and GNU cp) do even use chown and chmod in the same unsafe way that we did previously, so I will report that to them.
Thank you. Now, as for as I can tell, there is no way to move a file asking the user what to do if needed and avoid every race-conditions in a Unix-like OS. I will try to come with a solution that avoids the worse problems. That is good. Those two ways will have different effects if the file we overwrite/remove has a link count > 1. Current emacs implementation use "overwrite mode" in copy and "remove mode" in rename if it is in the same filesystem, Those are clearly the right things. copy-file is defined to overwrite an existing file; it would be wrong to do anything else (at least in the default case). Rename, in the case where it is implemented by the rename system call, will replace the existing file. but cross-filesystem rename use the "overwrite mode". In principle, that ought to replace the existing file, to be consistent with other cases of renaming. The easiest way might be to create an option (or reuse an existing option) in copy-file, so that rename-file can continue to handle this case by calling copy-file. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel