summaryrefslogtreecommitdiffstats
path: root/src/main/script.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/script.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main/script.c b/src/main/script.c
index b4f369d..017d92e 100644
--- a/src/main/script.c
+++ b/src/main/script.c
@@ -358,13 +358,11 @@ maintscript_fallback(struct pkginfo *pkg,
}
warning(_("unable to stat %s '%.250s': %s"),
cmd.name, oldscriptpath, strerror(errno));
- } else {
- if (!maintscript_exec(pkg, &pkg->installed, &cmd, &stab, SUBPROC_WARN)) {
- command_destroy(&cmd);
- free(buf);
- post_script_tasks();
- return 1;
- }
+ } else if (!maintscript_exec(pkg, &pkg->installed, &cmd, &stab, SUBPROC_WARN)) {
+ command_destroy(&cmd);
+ free(buf);
+ post_script_tasks();
+ return 1;
}
notice(_("trying script from the new package instead ..."));