]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire.cc
improve https method queue progress reporting
[apt.git] / apt-pkg / acquire.cc
index 07c4646f50fc9ba80a3434c7f17d615f4bbbb6ad..0c815c005bbc2a3710075b3344f626a716e89f72 100644 (file)
@@ -92,8 +92,11 @@ void pkgAcquire::Initialize()
 static bool SetupAPTPartialDirectory(std::string const &grand, std::string const &parent)
 {
    std::string const partial = parent + "partial";
-   if (CreateAPTDirectoryIfNeeded(grand, partial) == false &&
-        CreateAPTDirectoryIfNeeded(parent, partial) == false)
+   mode_t const mode = umask(S_IWGRP | S_IWOTH);
+   bool const creation_fail = (CreateAPTDirectoryIfNeeded(grand, partial) == false &&
+        CreateAPTDirectoryIfNeeded(parent, partial) == false);
+   umask(mode);
+   if (creation_fail == true)
       return false;
 
    std::string const SandboxUser = _config->Find("APT::Sandbox::User");