mirror of
https://github.com/leminlimez/Nugget.git
synced 2025-04-08 04:23:05 +08:00
fix windows path issue
This commit is contained in:
@@ -19,7 +19,7 @@ from tweaks.custom_gestalt_tweaks import CustomGestaltTweaks, ValueTypeStrings
|
|||||||
from tweaks.daemons_tweak import Daemon
|
from tweaks.daemons_tweak import Daemon
|
||||||
|
|
||||||
App_Version = "5.0"
|
App_Version = "5.0"
|
||||||
App_Build = 6
|
App_Build = 7
|
||||||
|
|
||||||
class Page(Enum):
|
class Page(Enum):
|
||||||
Home = 0
|
Home = 0
|
||||||
|
|||||||
@@ -163,11 +163,11 @@ class PosterboardTweak(Tweak):
|
|||||||
return
|
return
|
||||||
elif self.tendies == None or len(self.tendies) == 0:
|
elif self.tendies == None or len(self.tendies) == 0:
|
||||||
return
|
return
|
||||||
|
if os.name == "nt":
|
||||||
|
# try to get past directory name limit on windows
|
||||||
|
output_dir = "\\\\?\\" + output_dir
|
||||||
for tendie in self.tendies:
|
for tendie in self.tendies:
|
||||||
with zipfile.ZipFile(tendie.path, 'r') as zip_ref:
|
with zipfile.ZipFile(tendie.path, 'r') as zip_ref:
|
||||||
zip_ref.extractall(output_dir)
|
zip_ref.extractall(output_dir)
|
||||||
if os.name == "nt":
|
|
||||||
# try to get past directory name limit on windows
|
|
||||||
output_dir = "\\\\?\\" + output_dir
|
|
||||||
# add the files
|
# add the files
|
||||||
self.recursive_add(files_to_restore, curr_path=output_dir)
|
self.recursive_add(files_to_restore, curr_path=output_dir)
|
||||||
|
|||||||
Reference in New Issue
Block a user