Browse Source

Fix post-processing crash when using empty category folders.

tags/0.6.0
ShyPike 15 years ago
parent
commit
c322c00e6f
  1. 15
      sabnzbd/misc.py

15
sabnzbd/misc.py

@ -315,13 +315,16 @@ def real_path(loc, path):
path = path.strip() path = path.strip()
else: else:
path = '' path = ''
if path.startswith('~'): if path:
path = path.replace('~', sabnzbd.DIR_HOME+'/', 1) if path.startswith('~'):
if sabnzbd.WIN32: path = path.replace('~', sabnzbd.DIR_HOME+'/', 1)
if path[0] not in '/\\' and not (len(path) > 1 and path[0].isalpha() and path[1] == ':'): if sabnzbd.WIN32:
if path[0] not in '/\\' and not (len(path) > 1 and path[0].isalpha() and path[1] == ':'):
path = os.path.join(loc, path)
elif path[0] != '/':
path = os.path.join(loc, path) path = os.path.join(loc, path)
elif path[0] != '/': else:
path = os.path.join(loc, path) path = loc
return os.path.normpath(os.path.abspath(path)) return os.path.normpath(os.path.abspath(path))

Loading…
Cancel
Save