* #480'i duzelt
* a/b/c.html diye bir dosya varsa arsivde daha onceden a directory'sinin vs. yapilmis oldugunu varsayma
This commit is contained in:
+6
-4
@@ -145,17 +145,19 @@ class ArchiveZip(ArchiveBase):
|
|||||||
|
|
||||||
ofile = os.path.join(target_dir, outpath)
|
ofile = os.path.join(target_dir, outpath)
|
||||||
|
|
||||||
if is_dir: # a directory is present.
|
if is_dir: # this is a directory
|
||||||
os.mkdir(os.path.join(target_dir, info.filename))
|
os.makedirs(os.path.join(target_dir, info.filename))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# check that output dir is present
|
# check that output dir is present
|
||||||
util.check_dir(os.path.dirname(ofile))
|
util.check_dir(os.path.dirname(ofile))
|
||||||
|
|
||||||
if info.external_attr == self.symmagic:
|
# remove output file we might be overwriting
|
||||||
target = zip_obj.read(info.filename)
|
|
||||||
if os.path.exists(ofile):
|
if os.path.exists(ofile):
|
||||||
os.remove(ofile)
|
os.remove(ofile)
|
||||||
|
|
||||||
|
if info.external_attr == self.symmagic:
|
||||||
|
target = zip_obj.read(info.filename)
|
||||||
os.symlink(target, ofile)
|
os.symlink(target, ofile)
|
||||||
else:
|
else:
|
||||||
perm = info.external_attr
|
perm = info.external_attr
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class XmlFileTestCase(unittest.TestCase):
|
|||||||
pisi.api.init(False)
|
pisi.api.init(False)
|
||||||
|
|
||||||
def testMetaClass(self):
|
def testMetaClass(self):
|
||||||
|
|
||||||
class OtherInfo:
|
class OtherInfo:
|
||||||
__metaclass__ = xmlfile.autoxml
|
__metaclass__ = xmlfile.autoxml
|
||||||
t_BirthDate = [types.StringType, xmlfile.mandatory]
|
t_BirthDate = [types.StringType, xmlfile.mandatory]
|
||||||
|
|||||||
Reference in New Issue
Block a user