]> pd.if.org Git - zpackage/commitdiff
fix installing of symlinks
authorNathan Wagner <nw@hydaspes.if.org>
Sun, 30 Sep 2018 12:08:51 +0000 (12:08 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Sun, 30 Sep 2018 12:08:51 +0000 (12:08 +0000)
zpm-syncfs.c

index 6ea62415b7b9b84cffa58ca27d0a4d0bd29a8e85..958fde80535b90e611366dbe8c6ab89c4c64ad5c 100644 (file)
@@ -367,10 +367,11 @@ static int install_files(void *f, int ncols, char **vals, char **cols) {
                        IERR("zero length symlink not allowed");
                }
 
-               if (conf->verbose > 1) {
-                       fprintf(stderr, "symlink %s -> %s\n", path, target);
+               if (conf->verbose > 0) {
+                       fprintf(stderr, "symlink %s -> %s\n", dest, target);
                }
-               if (symlink(target, path) == -1) {
+               if (symlink(target, dest) == -1) {
+                       perror("symlink failed");
                        IERR("can't symlink");
                }
        } else {