diff options
Diffstat (limited to 'methods/mirror.cc')
-rw-r--r-- | methods/mirror.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/methods/mirror.cc b/methods/mirror.cc index 3b2ab8ede..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; } @@ -149,7 +150,7 @@ bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str) for (std::vector<std::string>::const_iterator I = vec.begin(); I != vec.end(); ++I) if (I == vec.begin()) - fetch += "?arch" + (*I); + fetch += "?arch=" + (*I); else fetch += "&arch=" + (*I); |