mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-14 20:35:48 +01:00
added catch so zip files are not treated as directories and also imported urllib to parse zip file names correctly
This commit is contained in:
parent
ce7a2acb90
commit
842f56afd1
@ -23,7 +23,7 @@ import json
|
||||
import os
|
||||
import xbmc
|
||||
import xbmcvfs
|
||||
|
||||
import urllib
|
||||
|
||||
def walk(path):
|
||||
|
||||
@ -48,14 +48,14 @@ def walk(path):
|
||||
current_dirs, current_files = [], []
|
||||
|
||||
for x in listdir(current_path, extra_metadata=True):
|
||||
if not x['file'].startswith("zip://"):
|
||||
if x['filetype'] == 'directory':
|
||||
|
||||
current_dirs.append(x['file'])
|
||||
if x['filetype'] == 'directory' and not x['file'].startswith("zip://"):
|
||||
|
||||
current_dirs.append(urllib.unquote(x['file']))
|
||||
|
||||
else:
|
||||
|
||||
current_files.append(x['file'])
|
||||
current_files.append(urllib.unquote(x['file']))
|
||||
|
||||
except IndexError:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user