7205: bundlebuilder accepts old "dist" cmd, checks for po dir

This commit is contained in:
chema
2008-07-10 13:58:12 -06:00
committed by Tomeu Vizoso
parent cc8e682ab0
commit 756b9309e8
2 changed files with 20 additions and 1 deletions
+12 -1
View File
@@ -132,7 +132,18 @@ class Bundle:
zip_file.close()
return True
def is_dir(self, filename):
if self._unpacked:
path = os.path.join(self._path, filename)
return os.path.isdir(path)
else:
zip_file = zipfile.ZipFile(self._path)
path = os.path.join(self._zip_root_dir, filename, "")
for f in zip_file.namelist():
if f.startswith(path):
return True
return False
def get_path(self):
"""Get the bundle path."""