Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
Bug 861985 - Mozfile.extract fails if dest is not specified, r=wlach
Browse files Browse the repository at this point in the history
  • Loading branch information
ahal-test committed Apr 15, 2013
1 parent 463df5f commit 6c32b26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mozfile/mozfile/mozfile.py
Expand Up @@ -64,12 +64,12 @@ def extract(src, dest=None):
"""

assert os.path.exists(src), "'%s' does not exist" % src
assert not os.path.isfile(dest), "dest cannot be a file"

if dest is None:
dest = os.path.dirname(src)
elif not os.path.isdir(dest):
os.makedirs(dest)
assert not os.path.isfile(dest), "dest cannot be a file"

if zipfile.is_zipfile(src):
namelist = extract_zip(src, dest)
Expand Down

0 comments on commit 6c32b26

Please sign in to comment.