Fix lndir
authorIan Lynagh <igloo@earth.li>
Tue, 8 Apr 2008 19:34:36 +0000 (19:34 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 8 Apr 2008 19:34:36 +0000 (19:34 +0000)
It would copy when it should symlink, and vice-versa.

utils/lndir/lndir.c

index 6cc240a..22f1e30 100644 (file)
@@ -176,7 +176,7 @@ int copyfile(const char *oldpath, const char *newpath) {
     char buf[BUFSIZE];
 
 #ifdef SYMLINKS
     char buf[BUFSIZE];
 
 #ifdef SYMLINKS
-    if (copy) {
+    if (copy == 0) {
         return symlink(oldpath, newpath);
     } else {
 #endif
         return symlink(oldpath, newpath);
     } else {
 #endif