summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2006-01-25 18:27:06 +0000
committerAndreas Gruenbacher <agruen@suse.de>2006-01-25 18:27:06 +0000
commit6eed529deb80e3ff8bc739a104aa93b2bf6df56f (patch)
tree4ff8ea9da1491a3c1f9b224e6cc8b77018371ce3
parent6a465ef8391b60586307fb465847d16b338237de (diff)
downloadquilt-6eed529deb80e3ff8bc739a104aa93b2bf6df56f.tar.gz
- lib/backup-files.c: Fix another missed optimization.
-rw-r--r--lib/backup-files.c6
-rw-r--r--quilt.changes5
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/backup-files.c b/lib/backup-files.c
index fe5b037..f958be5 100644
--- a/lib/backup-files.c
+++ b/lib/backup-files.c
@@ -329,12 +329,16 @@ process_file(const char *file)
perror(file);
goto fail;
}
+ unlink(backup);
+ remove_parents(backup);
} else {
if (!opt_silent)
printf("Restoring %s\n", file);
unlink(file);
if (link_or_copy_file(backup, &st, file))
goto fail;
+ unlink(backup);
+ remove_parents(backup);
if (opt_nolinks) {
if (ensure_nolinks(file))
goto fail;
@@ -347,8 +351,6 @@ process_file(const char *file)
(void) utime(file, &ut);
}
}
- unlink(backup);
- remove_parents(backup);
} else if (opt_what == what_remove) {
unlink(backup);
remove_parents(backup);
diff --git a/quilt.changes b/quilt.changes
index 48ad567..323ff58 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Wed Jan 25 19:27:11 CET 2006 - agruen@suse.de
+
+- lib/backup-files.c: Fix another missed optimization.
+
+-------------------------------------------------------------------
Wed Jan 25 18:43:38 CET 2006 - agruen@suse.de
- lib/backup-files.c: Cleanups by Markus F.X.J. Oberhumer