1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 09:46:25 +00:00

Allow metadata editor to embed directories

This commit is contained in:
Paweł Jastrzębski
2017-10-14 17:57:00 +02:00
parent 658d2f3281
commit 08ed304f8e
4 changed files with 40 additions and 23 deletions

View File

@@ -43,10 +43,10 @@ class MetadataParser:
'Bookmarks': []}
self.rawdata = None
self.compressor = None
if self.source.endswith('.xml'):
if self.source.endswith('.xml') and os.path.exists(self.source):
self.rawdata = parse(self.source)
self.parseXML()
else:
elif not self.source.endswith('.xml'):
if is_zipfile(self.source):
self.compressor = 'zip'
with ZipFile(self.source) as zip_file: