Let people force overwrite links
authorEric Andersen <andersen@codepoet.org>
Mon, 16 Sep 2002 10:23:38 +0000 (10:23 -0000)
committerEric Andersen <andersen@codepoet.org>
Mon, 16 Sep 2002 10:23:38 +0000 (10:23 -0000)
 -Erik

libbb/copy_file.c

index 1a584017f157ba02f4cee0d9e670c5b453844716..d71dbf47d5c6cbe2dd95e9f73453847204a03780 100644 (file)
@@ -47,7 +47,7 @@ int copy_file(const char *source, const char *dest, int flags)
                return -1;
        }
 
-       if (stat(dest, &dest_stat) < 0) {
+       if (lstat(dest, &dest_stat) < 0) {
                if (errno != ENOENT) {
                        perror_msg("unable to stat `%s'", dest);
                        return -1;