diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-14 21:13:11 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-07-14 21:13:11 +0200 |
commit | e7f389dcd40f0e5901f083f219a6223f252138fd (patch) | |
tree | 18658c0843450c53016fd5ccabaad7d382cdf69a /module/common | |
parent | has_key refractored, package name generator by Geek (diff) | |
download | pyload-e7f389dcd40f0e5901f083f219a6223f252138fd.tar.xz |
fixed download aborting
Diffstat (limited to 'module/common')
-rw-r--r-- | module/common/packagetools.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/module/common/packagetools.py b/module/common/packagetools.py index 36f4d753f..175c48937 100644 --- a/module/common/packagetools.py +++ b/module/common/packagetools.py @@ -39,6 +39,14 @@ def parseNames(files): iszPats = [ pat18, pat19 ] for file in files: + # remove trailing / + name = file.rstrip('/') + # extract last path part .. if there is a path + split = name.rsplit("/", 1) + if len(split) > 1: + name = split.pop(1) + + #check if a already existing package may be ok for this file found = False for name in packs: @@ -49,13 +57,6 @@ def parseNames(files): if found: continue - # remove trailing / - name = file.rstrip('/') - - # extract last path part .. if there is a path - split = name.rsplit("/", 1) - if len(split) > 1: - name = split.pop(1) # unrar pattern for pattern in rarPats: |