]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aft.c
com_addatt(): Return negative on errors
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index bfa4ce1ab7e29f56a418abdeb574aa4526e29c57..a5da1a929e8c5c34920aab8d798d1a7f64cb3e68 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -2150,9 +2150,10 @@ static int com_rm_callback(struct afs_callback_arg *aca)
        ret = for_each_matching_row(&pmd);
        if (ret < 0)
                goto out;
-       if (pmd.num_matches == 0)
-               ret = -E_NO_MATCH;
-       else if (flags & RM_FLAG_VERBOSE)
+       if (pmd.num_matches == 0) {
+               if (!(flags & RM_FLAG_FORCE))
+                       ret = -E_NO_MATCH;
+       } else if (flags & RM_FLAG_VERBOSE)
                para_printf(&aca->pbout, "removed %u file(s)\n",
                        pmd.num_matches);
 out: