Add a trailing separator for windows drive path

Fixes  #2581, #2526
This commit is contained in:
mano3m
2013-12-29 23:25:53 +01:00
parent 4a36c3b6a8
commit f08d34b816
3 changed files with 18 additions and 6 deletions
+5 -1
View File
@@ -2,7 +2,7 @@ from couchpotato.core.helpers.encoding import simplifyString, toSafeString, ss
from couchpotato.core.logger import CPLog
import collections
import hashlib
import os.path
import os
import platform
import random
import re
@@ -219,3 +219,7 @@ def splitString(str, split_on = ',', clean = True):
def dictIsSubset(a, b):
return all([k in b and b[k] == v for k, v in a.items()])
def isSubFolder(sub_folder, base_folder):
# Returns True is sub_folder is the same as or in base_folder
return base_folder.rstrip(os.path.sep) + os.path.sep in sub_folder.rstrip(os.path.sep) + os.path.sep