don't fail when importing apkg that references subdirs

This commit is contained in:
Damien Elmes 2013-01-15 07:43:10 +09:00
parent ca1c461348
commit ab46fa0a70

View File

@ -323,7 +323,11 @@ insert or ignore into revlog values (?,?,?,?,?,?,?,?,?)""", revlog)
def _writeDstMedia(self, fname, data):
path = os.path.join(self.dst.media.dir(), fname)
try:
open(path, "wb").write(data)
except (OSError, IOError):
# the user likely used subdirectories
pass
def _mungeMedia(self, mid, fields):
fields = splitFields(fields)