summaryrefslogtreecommitdiff
path: root/methods/mirror.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-05-22 16:07:49 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-05-22 16:07:49 +0200
commit800694cbf33e206935dc9e6e8fa6e9a036b8efad (patch)
tree1557d96ee0f463a020b11604146be66fb9809a31 /methods/mirror.cc
parent6c0c0387e616f8d04f00916fbd1fe899acd265cd (diff)
parent1351329e376a8dbe7780693693d0f3db0ec749fa (diff)
merged (and resolved a bunch of conflicts) of the debian-sid branch
Diffstat (limited to 'methods/mirror.cc')
-rw-r--r--methods/mirror.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/methods/mirror.cc b/methods/mirror.cc
index 3d5983efa..d6c5ba955 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;
}
@@ -147,9 +148,9 @@ bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str)
// append all architectures
std::vector<std::string> vec = APT::Configuration::getArchitectures();
for (std::vector<std::string>::const_iterator I = vec.begin();
- I != vec.end(); I++)
+ I != vec.end(); ++I)
if (I == vec.begin())
- fetch += "?arch" + (*I);
+ fetch += "?arch=" + (*I);
else
fetch += "&arch=" + (*I);