(apply_attributes): New function.
authorJim Meyering <jim@meyering.net>
Thu, 3 Jul 1997 12:16:41 +0000 (12:16 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 3 Jul 1997 12:16:41 +0000 (12:16 +0000)
commit22ff29fe3e30ae72079b3aa0ec952c7351173fa7
tree01faeaf3f98c6f0378fff012984f9e7f25a6627f
parentab171ee6b54986f31a62a6eef11c5daa3dd3ff05
(apply_attributes): New function.
(copy_reg): Use apply_attributes instead of open-coding the pieces.
Now, failure to preserve file attributes does not cause mv to change
its exit status, and such failures elicit warning diagnostics.  This
behavior is required by POSIX.  Before, failure to preserve ownership
due to insufficient access was diagnosed only for root.
Prompted by a report from Bengt Martensson.
src/mv.c