diff options
author | Jim Meyering <jim@meyering.net> | 2000-01-02 08:53:30 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-01-02 08:53:30 +0000 |
commit | af6d4ad6ca7804fd521d1cbebc3bd055245f578d (patch) | |
tree | 33fe7608416fc4b6c852feb667b17d1766feea0b /src | |
parent | 70cc36958837c577308aba7c9f32b936640fa432 (diff) | |
download | coreutils-af6d4ad6ca7804fd521d1cbebc3bd055245f578d.tar.xz |
Remove non-POSIX warning about trailing-slashed symlink-to-directory.
Diffstat (limited to 'src')
-rw-r--r-- | src/mv.c | 24 |
1 files changed, 2 insertions, 22 deletions
@@ -1,5 +1,5 @@ /* mv -- move or rename files - Copyright (C) 86, 89, 90, 91, 1995-1999 Free Software Foundation, Inc. + Copyright (C) 86, 89, 90, 91, 1995-2000 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -300,27 +300,7 @@ movefile (char *source, char *dest, int dest_is_dir, rename semantics are POSIX and susv2 compliant. */ if (remove_trailing_slashes) - { - strip_trailing_slashes_2 (source); - } - else - { - char *src_copy = xstrdup (source); - int src_has_trailing_slash = strip_trailing_slashes_2 (src_copy); - if (src_has_trailing_slash) - { - /* See if lstat says the trailing-slash-free src_copy - is a symbolic link. */ - struct stat stat_buf; - if (lstat (src_copy, &stat_buf) == 0 && S_ISLNK (stat_buf.st_mode) - && stat (src_copy, &stat_buf) == 0 && S_ISDIR (stat_buf.st_mode)) - { - error (0, 0, _("%s: warning: moving a symlink-to-directory\ - referenced with a\ntrailing slash may move the directory, not the symlink"), - source); - } - } - } + strip_trailing_slashes_2 (source); /* In addition to when DEST is a directory, if DEST has a trailing slash and neither SOURCE nor DEST is a directory, presume the target |