New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File::Copy::move does not move when destination is hardlink to source #10009
Comments
From perlbug@plan9.deCreated by perlbug@plan9.deFile::Copy::move silently fails to move a file if the destination path The problem is likely that it uses rename but doesn't check whether rename Perl Info
|
From @jkeenanOn Sun Dec 06 16:58:15 2009, perlbug@plan9.de wrote:
To my surprise, I get different results on different OSes when I try to On both OSes: $ ln -v alpha.txt tmp/beta.txt $ cat tmp/beta.txt On Linux: ### $ cat alpha.txt $ cat tmp/beta.txt Corroborates problem reported by original poster. However, on Darwin ... ### $ cat alpha.txt $ cat tmp/beta.txt ... which does what I think original poster feels should happen. Am I misunderstanding something about the problem -- or is this a Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From schmorp@schmorp.deOn Tue, Nov 29, 2011 at 04:27:53PM -0800, James E Keenan via RT <perlbug-followup@perl.org> wrote:
Just guessing, but thats probably because linux implements posix rename() The relevant posix spec section is, as I know nowadays: If the old argument and the new argument resolve to the same existing that is, if both old and new are hardlinks to the same file, rename just silly - one would expect rename to work on filenames. In any case, since rename is "just" an optimiation, File::Copy ought to In any case, rename returning success on a posix system does not mean the -- |
Migrated from rt.perl.org#71082 (status was 'open')
Searchable as RT71082$
The text was updated successfully, but these errors were encountered: