Browse Source

Remove leading '//' from *NIX paths

Fixes #2506,  #2021
pull/2642/head
mano3m 12 years ago
parent
commit
e69421226b
  1. 5
      couchpotato/core/helpers/encoding.py

5
couchpotato/core/helpers/encoding.py

@ -64,10 +64,13 @@ def sp(path, *args):
if path != os.path.sep:
path = path.rstrip(os.path.sep)
# Add a trailing separator in case it is a root folder on windows
# Add a trailing separator in case it is a root folder on windows (crashes guessit)
if len(path) == 2 and path[1] == ':':
path = path + os.path.sep
# Replace *NIX ambiguous '//' at the beginning of a path with '/' (crashes guessit)
path = re.sub('^//', '/', path)
return path
def ek(original, *args):

Loading…
Cancel
Save