com_create: Abort if pre-create hook fails.
authorAndre Noll <maan@systemlinux.org>
Tue, 7 Apr 2009 14:15:01 +0000 (16:15 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 7 Apr 2009 14:15:01 +0000 (16:15 +0200)
handle_pre_create_hook_exit() returns zero if the hook failed.

dss.c

diff --git a/dss.c b/dss.c
index 2a18857..3bfcfe7 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -983,7 +983,7 @@ static int com_create(void)
                if (ret < 0)
                        return ret;
                ret = handle_pre_create_hook_exit(status);
-               if (ret < 0)
+               if (ret <= 0) /* error, or pre-create failed */
                        return ret;
        }
        create_rsync_argv(&rsync_argv, &current_snapshot_creation_time);