summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm')
-rw-r--r--urpm/media.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index cc7aa684..bdabc44d 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -1489,9 +1489,10 @@ sub _update_medium__parse_if_unmodified__remote {
} else {
#- try to sync (copy if needed) local copy after restored the previous one.
#- this is useful for rsync (?)
- if (-e statedir_hdlist_or_synthesis($urpm, $medium, 's')) {
+ my $previous_hdlist = statedir_hdlist_or_synthesis($urpm, $medium, 's');
+ if (-e $previous_hdlist) {
copy_and_own(
- statedir_hdlist_or_synthesis($urpm, $medium, 's'),
+ $previous_hdlist,
cachedir_with_hdlist($urpm, $medium, 's'),
) or $error->(N("...copying failed")), return;
}