mirror of
https://github.com/leminlimez/Nugget.git
synced 2025-04-08 04:23:05 +08:00
fix windows os error
This commit is contained in:
@@ -9,4 +9,13 @@ def fix_windows_path(dos_path: str, encoding=None):
|
||||
return u"\\\\?\\UNC\\" + path[2:]
|
||||
return u"\\\\?\\" + path
|
||||
else:
|
||||
return dos_path
|
||||
return dos_path
|
||||
|
||||
def windows_join_path(og_path: str, join: str):
|
||||
if os.name == 'nt':
|
||||
final_path = og_path
|
||||
for dir in join.split('/'):
|
||||
final_path = os.path.join(final_path, dir)
|
||||
return final_path
|
||||
else:
|
||||
return os.path.join(og_path, join)
|
||||
Reference in New Issue
Block a user