Whoops.
This commit is contained in:
parent
b8e9aabd67
commit
cce6fde4ea
@ -43,7 +43,6 @@ def fixWindowsPath(path):
|
|||||||
GetLongPathName = ctypes.windll.kernel32.GetLongPathNameW
|
GetLongPathName = ctypes.windll.kernel32.GetLongPathNameW
|
||||||
buffer = ctypes.create_unicode_buffer(260)
|
buffer = ctypes.create_unicode_buffer(260)
|
||||||
rv = GetLongPathName(path.capitalize(), buffer, 260)
|
rv = GetLongPathName(path.capitalize(), buffer, 260)
|
||||||
print(rv, buffer.value)
|
|
||||||
if rv == 0 or rv > 260:
|
if rv == 0 or rv > 260:
|
||||||
return path
|
return path
|
||||||
return buffer.value
|
return buffer.value
|
||||||
@ -58,7 +57,7 @@ for i, line in enumerate(lines):
|
|||||||
|
|
||||||
if os.name == 'nt' and os.path.exists(path):
|
if os.name == 'nt' and os.path.exists(path):
|
||||||
path = fixWindowsPath(path)
|
path = fixWindowsPath(path)
|
||||||
line = ' '.join('FILE', line[1], path)
|
line = ' '.join(['FILE', line[1], path])
|
||||||
lines[i] = line
|
lines[i] = line
|
||||||
|
|
||||||
path = os.path.dirname(path)
|
path = os.path.dirname(path)
|
||||||
|
Loading…
Reference in New Issue
Block a user