X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/9055d5e68bd09f31df00e45bd14cb599ba3735e5..d123b4d7797497aee768fa0b80ffb33bc997be22:/apt-private/private-download.cc diff --git a/apt-private/private-download.cc b/apt-private/private-download.cc index 4894c72bf..40312d0c8 100644 --- a/apt-private/private-download.cc +++ b/apt-private/private-download.cc @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -224,6 +225,7 @@ bool DoDownload(CommandLine &CmdL) std::ifstream src((*I)->DestFile.c_str(), std::ios::binary); std::ofstream dst(filename.c_str(), std::ios::binary); dst << src.rdbuf(); + chmod(filename.c_str(), 0644); } } return Failed == false; @@ -331,7 +333,7 @@ bool DoClean(CommandLine &) c1out << "Del " << Pkg << " " << Ver << " [" << SizeToStr(St.st_size) << "B]" << std::endl; if (_config->FindB("APT::Get::Simulate") == false) - unlink(File); + RemoveFile("Cleaner::Erase", File); }; }; bool DoAutoClean(CommandLine &)