]> git.tuebingen.mpg.de Git - dss.git/blobdiff - dss.c
pre_remove_hook: Really pass full path of the snapshot.
[dss.git] / dss.c
diff --git a/dss.c b/dss.c
index 347268e23a22e5db6e2386ba046045ea4266d475..53707bd1cbd6fd0da5197096dc484466ba63805f 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -250,8 +250,7 @@ static int pre_remove_hook(struct snapshot *s, const char *why)
        cmd = make_message("%s %s/%s", conf.pre_remove_hook_arg,
                conf.dest_dir_arg, s->name);
        DSS_DEBUG_LOG("executing %s\n", cmd);
-       ret = dss_exec_cmdline_pid(&remove_pid,
-               conf.pre_remove_hook_arg, fds);
+       ret = dss_exec_cmdline_pid(&remove_pid, cmd, fds);
        free(cmd);
        if (ret < 0)
                return ret;
@@ -1118,8 +1117,10 @@ static int select_loop(void)
                case HS_POST_RUNNING:
                        continue;
                case HS_PRE_SUCCESS:
-                       free_rsync_argv(rsync_argv);
-                       create_rsync_argv(&rsync_argv, &current_snapshot_creation_time);
+                       if (!name_of_reference_snapshot) {
+                               free_rsync_argv(rsync_argv);
+                               create_rsync_argv(&rsync_argv, &current_snapshot_creation_time);
+                       }
                        /* fall through */
                case HS_NEEDS_RESTART:
                        if (!next_snapshot_is_due())