]> git.tuebingen.mpg.de Git - dss.git/commitdiff
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 2a18857ecd1f3db9f12a698710385f415be8b53b..3bfcfe77b62abbd898d6bc6c8f09148ba5e5c564 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);