Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/bundle
diff options
context:
space:
mode:
authorchema <chema@chema-laptop.(none)>2008-07-10 19:58:12 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2008-07-19 13:54:54 (GMT)
commit756b9309e8dc2686da64287466199e318817a62c (patch)
tree2813934f797b521691745013ad43a64959815c2d /src/sugar/bundle
parentcc8e682ab03fc38d56202823e0120bb62cdfcc3e (diff)
7205: bundlebuilder accepts old "dist" cmd, checks for po dir
Diffstat (limited to 'src/sugar/bundle')
-rw-r--r--src/sugar/bundle/bundle.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/sugar/bundle/bundle.py b/src/sugar/bundle/bundle.py
index 9e876c2..3b12932 100644
--- a/src/sugar/bundle/bundle.py
+++ b/src/sugar/bundle/bundle.py
@@ -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."""