summaryrefslogtreecommitdiff
path: root/methods/mirror.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-04-11 17:45:36 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-04-11 17:45:36 +0200
commitc3753d1de25737aed66d6ca14d0473042b7c55a7 (patch)
tree750745b523fee36d66b4cdd041fc8117be22c5fe /methods/mirror.cc
parent621aeca0bc8fe39c57d6221c7581c758e5822fd0 (diff)
parentd68d65ad637526e46ea77ab83e07470d26df15fc (diff)
merged from donkults experimental branch
Diffstat (limited to 'methods/mirror.cc')
-rw-r--r--methods/mirror.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/methods/mirror.cc b/methods/mirror.cc
index 3b2ab8ede..eb6d97425 100644
--- a/methods/mirror.cc
+++ b/methods/mirror.cc
@@ -124,9 +124,10 @@ bool MirrorMethod::Clean(string Dir)
if (I == list.end())
unlink(Dir->d_name);
};
-
- chdir(StartDir.c_str());
+
closedir(D);
+ if (chdir(StartDir.c_str()) != 0)
+ return _error->Errno("chdir",_("Unable to change to %s"),StartDir.c_str());
return true;
}