Win dir also need prefix \\?\

This commit is contained in:
limkokhole
2020-06-26 02:44:45 +08:00
parent 9b6bccdaeb
commit 88770c36ba

View File

@@ -654,6 +654,9 @@ def download_img(image, save_dir, arg_force_update, IMG_SESSION, V_SESSION, arg_
def create_dir(save_dir): def create_dir(save_dir):
try: try:
if IS_WIN:
os.makedirs('\\\\?\\' + os.path.abspath(save_dir))
else:
os.makedirs(save_dir) os.makedirs(save_dir)
except FileExistsError: # Check this first to avoid OSError cover this except FileExistsError: # Check this first to avoid OSError cover this
pass # Normal if re-download pass # Normal if re-download