[Python-checkins] r60847 - sandbox/trunk/setuptools/pkg_resources.py
phillip.eby
python-checkins at python.org
Sat Feb 16 00:49:44 CET 2008
Author: phillip.eby
Date: Sat Feb 16 00:49:44 2008
New Revision: 60847
Modified:
sandbox/trunk/setuptools/pkg_resources.py
Log:
Fixed issues with empty resource names for resource_listdir et al.
Modified: sandbox/trunk/setuptools/pkg_resources.py
==============================================================================
--- sandbox/trunk/setuptools/pkg_resources.py (original)
+++ sandbox/trunk/setuptools/pkg_resources.py Sat Feb 16 00:49:44 2008
@@ -1188,7 +1188,9 @@
)
def _fn(self, base, resource_name):
- return os.path.join(base, *resource_name.split('/'))
+ if resource_name:
+ return os.path.join(base, *resource_name.split('/'))
+ return base
def _get(self, path):
if hasattr(self.loader, 'get_data'):
@@ -1226,8 +1228,6 @@
-
-
class DefaultProvider(EggProvider):
"""Provides access to package resources in the filesystem"""
More information about the Python-checkins
mailing list