fixing bug
This commit is contained in:
@@ -223,6 +223,7 @@ def findseason(path, filename, readonly):
|
|||||||
|
|
||||||
return seasonpath
|
return seasonpath
|
||||||
|
|
||||||
|
|
||||||
def checkfileexists(filename, casesensitive=True):
|
def checkfileexists(filename, casesensitive=True):
|
||||||
"""
|
"""
|
||||||
Check to see if a file currently exists
|
Check to see if a file currently exists
|
||||||
@@ -230,9 +231,9 @@ def checkfileexists(filename, casesensitive=True):
|
|||||||
if casesensitive:
|
if casesensitive:
|
||||||
return os.path.exists(filename)
|
return os.path.exists(filename)
|
||||||
else:
|
else:
|
||||||
filename = os.path.basename(filename)
|
basename = os.path.basename(filename)
|
||||||
for dirfile in os.listdir(os.path.dirname(filename)):
|
for dirfile in os.listdir(os.path.dirname(filename)):
|
||||||
if (filename.lower() == dirfile.lower()):
|
if (basename.lower() == dirfile.lower()):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user