Merge branch 'main' into pb-video

This commit is contained in:
leminlimez
2025-03-31 12:45:23 -04:00
4 changed files with 26 additions and 5 deletions

View File

@@ -0,0 +1,12 @@
import os
def fix_windows_path(dos_path: str, encoding=None):
if os.name == 'nt':
if (not isinstance(dos_path, str) and encoding is not None):
dos_path = dos_path.decode(encoding)
path = os.path.abspath(dos_path)
if path.startswith(u"\\\\"):
return u"\\\\?\\UNC\\" + path[2:]
return u"\\\\?\\" + path
else:
return dos_path