Allow prefix to be the root directory

This commit is contained in:
William Hubbs 2017-11-22 16:21:08 -06:00 committed by Jussi Pakkanen
parent 247d632f37
commit 325b2c25b6
1 changed files with 4 additions and 0 deletions

View File

@ -193,6 +193,10 @@ class CoreData:
# string is of type 'C:\' because 'C:' is not an absolute path.
if len(prefix) == 3 and prefix[1] == ':':
pass
# If prefix is a single character, preserve it since it is
# the root directory.
elif len(prefix) == 1:
pass
else:
prefix = prefix[:-1]
return prefix