X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm-syncfs.c;h=958fde80535b90e611366dbe8c6ab89c4c64ad5c;hb=ba901e2a9d0361de899461397cc6380549f8661a;hp=073ad0b291188dfd92b2013ac69fe46b412dea67;hpb=13d1ad658f43eb0370f88dc2e635428124dda560;p=zpackage diff --git a/zpm-syncfs.c b/zpm-syncfs.c index 073ad0b..958fde8 100644 --- a/zpm-syncfs.c +++ b/zpm-syncfs.c @@ -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 { @@ -383,7 +384,7 @@ static int install_files(void *f, int ncols, char **vals, char **cols) { } } - struct timespec times[2] = { 0 }; + struct timespec times[2] = { {0}, {0} }; double mtime = strtod(COL("mtime"),NULL); times[0].tv_nsec = UTIME_OMIT;