aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt8
-rw-r--r--pkg_resources.py3
2 files changed, 10 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 3efef119..67430518 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -3,6 +3,14 @@ CHANGES
=======
------
+0.6.49
+------
+
+* Move warning check in ``get_cache_path`` to follow the directory creation
+ to avoid errors when the cache path does not yet exist. Fixes the error
+ reported in #375.
+
+------
0.6.48
------
diff --git a/pkg_resources.py b/pkg_resources.py
index f0965a89..41c73d42 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -989,13 +989,14 @@ variable to point to an accessible directory.
extract, as it tracks the generated names for possible cleanup later.
"""
extract_path = self.extraction_path or get_default_cache()
- self._warn_unsafe_extraction_path(extract_path)
target_path = os.path.join(extract_path, archive_name+'-tmp', *names)
try:
_bypass_ensure_directory(target_path)
except:
self.extraction_error()
+ self._warn_unsafe_extraction_path(extract_path)
+
self.cached_files[target_path] = 1
return target_path