diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2012-03-20 19:23:32 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2012-03-20 19:23:32 +0100 |
commit | 319790f4f86f595724fb2bd5aa6274d345469010 (patch) | |
tree | 0c2686423a217f557fbdd990111d6947a5d228e7 /methods/mirror.cc | |
parent | 571449d4444a8a6f5c55dce318cdf16805c04743 (diff) |
* methods/rred.cc:
- check return of writev() as gcc recommends
* methods/mirror.cc:
- check return of chdir() as gcc recommends
* apt-pkg/deb/dpkgpm.cc:
- check return of write() a gcc recommends
* apt-inst/deb/debfile.cc:
- check return of chdir() as gcc recommends
* apt-inst/deb/dpkgdb.cc:
- check return of chdir() as gcc recommends
Diffstat (limited to 'methods/mirror.cc')
-rw-r--r-- | methods/mirror.cc | 5 |
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; } |