]> git.saurik.com Git - apt.git/commitdiff
Merge remote-tracking branch 'donkult/feature/clientmergepdiffs' into debian/experime...
authorMichael Vogt <mvo@debian.org>
Sun, 5 Jan 2014 09:06:26 +0000 (10:06 +0100)
committerMichael Vogt <mvo@debian.org>
Sun, 5 Jan 2014 09:06:26 +0000 (10:06 +0100)
1  2 
apt-pkg/contrib/fileutl.cc

index efbf7aaf4c2300ac61d309c63465efb67a4430b3,130e990c39831a52234abe6ab2d933d4561d99a4..ffb8b4b53cc628a6caba0dc36b3d3f6121094d6a
@@@ -465,7 -465,7 +465,7 @@@ std::vector<string> GetListOfFilesInDir
        const char *C = Ent->d_name;
        for (; *C != 0; ++C)
         if (isalpha(*C) == 0 && isdigit(*C) == 0
-            && *C != '_' && *C != '-') {
+            && *C != '_' && *C != '-' && *C != ':') {
            // no required extension -> dot is a bad character
            if (*C == '.' && Ext.empty() == false)
               continue;
@@@ -1827,20 -1827,3 +1827,20 @@@ std::vector<std::string> Glob(std::stri
     return result;
  }
                                                                        /*}}}*/
 +
 +std::string GetTempDir()
 +{
 +   const char *tmpdir = getenv("TMPDIR");
 +
 +#ifdef P_tmpdir
 +   if (!tmpdir)
 +      tmpdir = P_tmpdir;
 +#endif
 +
 +   // check that tmpdir is set and exists
 +   struct stat st;
 +   if (!tmpdir || strlen(tmpdir) == 0 || stat(tmpdir, &st) != 0)
 +      tmpdir = "/tmp";
 +
 +   return string(tmpdir);
 +}