X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/ac7f8f7916f16905d8eeb0133bc650d89726d0f4..28f24d3dad1844af316337d565ba2ebc11c8ce97:/apt-pkg/cdrom.cc diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index 76c450618..29eeca066 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -155,10 +156,7 @@ bool pkgCdrom::FindPackages(string CD, // Skip some files.. if (strcmp(Dir->d_name,".") == 0 || strcmp(Dir->d_name,"..") == 0 || - //strcmp(Dir->d_name,"source") == 0 || strcmp(Dir->d_name,".disk") == 0 || - strcmp(Dir->d_name,"experimental") == 0 || - strcmp(Dir->d_name,"binary-all") == 0 || strcmp(Dir->d_name,"debian-installer") == 0) continue; @@ -428,8 +426,8 @@ bool pkgCdrom::WriteDatabase(Configuration &Cnf) { string DFile = _config->FindFile("Dir::State::cdroms"); string NewFile = DFile + ".new"; - - unlink(NewFile.c_str()); + + RemoveFile("WriteDatabase", NewFile); ofstream Out(NewFile.c_str()); if (!Out) return _error->Errno("ofstream::ofstream", @@ -470,7 +468,7 @@ bool pkgCdrom::WriteSourceList(string Name,vector &List,bool Source) return _error->Errno("ifstream::ifstream","Opening %s",File.c_str()); string NewFile = File + ".new"; - unlink(NewFile.c_str()); + RemoveFile("WriteDatabase", NewFile); ofstream Out(NewFile.c_str()); if (!Out) return _error->Errno("ofstream::ofstream",