summaryrefslogtreecommitdiff
path: root/src/mv.c
AgeCommit message (Collapse)Author
1998-08-16(do_move): Fail upon attempt to move a directory into itself.Jim Meyering
With prodding from François Pinard :-)
1998-07-26(chown): Remove unused definition.Jim Meyering
Reported by Kaveh Ghazi.
1998-05-11(do_move): Remove lots of code that was duplicated inJim Meyering
copy.c (copy), now that copy() has better support for mv. This fixes a bug with cross-filesystem `mv -i' whereby you could get two prompts for the same destination file and eventually remove the destination file even though one of the responses was negative. Reported by Dirk Lattermann.
1998-05-10(cp_option_init): Initialize new members.Jim Meyering
1998-05-04remove dcl of unused safe_readJim Meyering
1998-04-26Don't define NDEBUG.Jim Meyering
1998-03-15Use #if, not #ifdef with HAVE_ macros.Jim Meyering
Use #if !, not #ifndef with HAVE_ macros.
1998-03-13(do_move): Add &copy_into_self arg in call to copy.Jim Meyering
Don't remove source directory when copy_into_self is nonzero. Reported by Arne Henrik Juul.
1998-02-16(cp_option_init): Set copy_as_regular to 0, not 1.Jim Meyering
Otherwise, mv tries to open special files. Reported by Kjetil Torgrim Homme.
1998-01-22(rm_option_init): New function.Jim Meyering
(cp_option_init): New function. (copy_reg): Remove now-unused function. (do_move): Set up for and use `copy.c (copy)' in place of copy_reg. Set up for and use `remove.c (rm)' in place of unlink.
1998-01-04(main, usage): Check for write error to stdout before exiting.Jim Meyering
Include "closeout.h".
1997-12-13(do_move): If rename fails for any reason (not just whenJim Meyering
errno == EXDEV), then revert to trying copy-then-unlink. This is necessary to allow moving files within certain types of Linux NFS mounted filesystems. Reported by Marty Leisner.
1997-10-07update bug-reporting addressJim Meyering
1997-07-03(apply_attributes): New function.Jim Meyering
(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.
1997-06-29(copy_reg): New parameter, SOURCE_STATS.Jim Meyering
(do_move): Update caller. (movefile): Take new boolean parameter, DEST_IS_DIR, to save a stat per moved file when the destination is a directory. (main): Call movefile with additional argument. (strip_trailing_slashes_2): New function. (movefile): Remove trailing slashes from dest. Otherwise, stat ("b/") fails with ENOTDIR on systems including Linux w/libc 2.0.30. Reproduce with `rm -rf a b; mkdir a; touch b; ./mv a b/'. (do_move): Fix misleading comment.
1997-05-27Use base_name, not basename.Jim Meyering
1997-02-09update copyrights for 1997Jim Meyering
1997-02-01bracket bug address with <> and append a periodJim Meyering
1997-02-01Compare getopt_long return value against -1, not EOF. Use NULL, not '(int ↵Jim Meyering
*) 0' as last parameter in getopt_long call.
1996-11-23(usage): Alphabetize option descriptions the way sort -f would.Jim Meyering
1996-11-03change bug-reporting addressJim Meyering
1996-11-02change bug-reporting addressJim Meyering
1996-10-05(main): update --version output to conform to coding standardJim Meyering
1996-10-04(main): update --version output to conform to coding standardJim Meyering
1996-08-31(usage): remove spurious trailing \n in puts.Jim Meyering
1996-08-29(usage): Tell where to report bugs.Jim Meyering
1996-08-19Include path-concat.h.Jim Meyering
(movefile): Use path_concat instead of open-coding its functionality. Declare pointer parameters const as appropriate.
1996-07-06(usage): Factor out backup-related text into separate string/printf statement.Jim Meyering
1996-07-05(usage): Remove space before newline in usage message.Jim Meyering
1996-05-28(main): Don't mark "%s" as a translatable string.Jim Meyering
From Göran Uddeborg.
1996-05-15(main): Restructure pluralization of error message so it's easier to translate.Jim Meyering
1996-04-24update Copyright years for 1996Jim Meyering
1996-04-24[HAVE_LCHOWN]: Define chown to lchown.Jim Meyering
1996-03-24Update FSF's address.Jim Meyering
1996-03-21(main): Declare to be of type int, not void.Jim Meyering
1996-03-16Don't include version.h.Jim Meyering
(main): Use PACKAGE_VERSION instead of version_string.
1996-03-12(main): Initialize for internationalized message support: call setlocale,Jim Meyering
bindtextdomain, and textdomain.
1995-11-29Mark all translatable strings using po-mode.el.Jim Meyering
1995-11-27s/non-zero/nonzero/gJim Meyering
1995-11-15Break long lines.Jim Meyering
1995-11-10Remove fwd dcls.Jim Meyering
1995-11-10Don't protoize dcl of basename.Jim Meyering
1995-11-09Rearrange functions to obviate forward dcls.Jim Meyering
Remove forward dcls.
1995-11-09Protoize.Jim Meyering
1995-11-03(do_move): Use euidaccess instead of euidaccess_stat.Likewise.Jim Meyering
1995-06-22(main): Include program name in --version output.Jim Meyering
1995-05-22(usage): Add one or two lines of descriptive text.Jim Meyering
1995-05-13Use stat (lstat), not safe_stat (safe_lstat).Jim Meyering
1995-05-13(movefile): Remove a single trailing slash from destdir before concatenatingJim Meyering
with `/' and filename for `ok to overwrite...' message.
1995-03-10add 1995 to Copyright datesJim Meyering