Mercurial > hg > octave-lojdl > gnulib-hg
diff lib/rename.c @ 12096:1f43035b0900
rename-dest-slash: merge into rename module
Tested that NetBSD workaround still passes unit test.
* modules/rename-dest-slash (Status): Mark obsolete.
(Depends-on): Add rename.
(Files): Let rename do it all.
* m4/rename.m4 (gl_FUNC_RENAME): Also test for NetBSD bugs,
subsuming the test from gl_FUNC_RENAME_TRAILING_DEST_SLASH...
* m4/rename-dest-slash.m4: ...so this file can be deleted.
* lib/rename-dest-slash.c (rpl_rename_dest_slash): Delete.
* lib/rename.c (rpl_rename): Update comments.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Sat, 26 Sep 2009 15:18:13 -0600 |
parents | 724dd32f13f7 |
children | bb32464985d7 |
line wrap: on
line diff
--- a/lib/rename.c +++ b/lib/rename.c @@ -228,8 +228,10 @@ already covered that situation. But if there is any problem with a trailing slash on an existing source or destination, as in Solaris 9, or if a directory can overwrite a symlink, as on - Cygwin 1.5, then we must strip the offending slash and check that - we have not encountered a symlink instead of a directory. + Cygwin 1.5, or if directories cannot be created with trailing + slash, as on NetBSD 1.6, then we must strip the offending slash + and check that we have not encountered a symlink instead of a + directory. Stripping a trailing slash interferes with POSIX semantics, where rename behavior on a symlink with a trailing slash operates on