summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/fileutl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 847d8b47f..efbf7aaf4 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -1839,7 +1839,7 @@ std::string GetTempDir()
// check that tmpdir is set and exists
struct stat st;
- if (!tmpdir || stat(tmpdir, &st) != 0)
+ if (!tmpdir || strlen(tmpdir) == 0 || stat(tmpdir, &st) != 0)
tmpdir = "/tmp";
return string(tmpdir);