mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-28 13:42:36 +01:00
Workaround stupid os.path.join stupidity.
This commit is contained in:
parent
bb3df205f2
commit
c3b32148b3
@ -544,10 +544,11 @@ class Directory(registry.String):
|
||||
filename = os.path.abspath(filename)
|
||||
selfAbs = os.path.abspath(myself)
|
||||
commonPrefix = os.path.commonprefix([selfAbs, filename])
|
||||
filename = filename[len(commonPrefix)+1:] # +1 for extra /.
|
||||
filename = filename[len(commonPrefix):]
|
||||
elif not os.path.isabs(myself):
|
||||
if filename.startswith(myself):
|
||||
filename = filename[len(myself):]
|
||||
filename = filename.lstrip(os.path.sep) # Stupid os.path.join!
|
||||
return os.path.join(myself, filename)
|
||||
|
||||
class DataFilename(registry.String):
|
||||
|
Loading…
Reference in New Issue
Block a user