Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Commit

Permalink
Fix error when using 7-Zip with an unlaunched NAND
Browse files Browse the repository at this point in the history
  • Loading branch information
Armando G. Mondul committed Nov 26, 2019
1 parent 1fc1876 commit 99b461f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions HiyaCFW_Helper.py
Expand Up @@ -11,7 +11,7 @@
from tkinter.messagebox import askokcancel, showerror, showinfo, WARNING
from tkinter.filedialog import askopenfilename, askdirectory
from platform import system
from os import path, remove, listdir
from os import path, remove, chmod, listdir
from sys import exit
from threading import Thread
from queue import Queue, Empty
Expand Down Expand Up @@ -618,9 +618,17 @@ def get_launcher(self):
# Delete contents of the launcher folder as it will be replaced by the one from HiyaCFW
launcher_folder = path.join(self.sd_path, 'title', '00030017', app, 'content')

# Walk through all files in the launcher content folder and delete them
# Walk through all files in the launcher content folder
for file in listdir(launcher_folder):
remove(path.join(launcher_folder, file))
file = path.join(launcher_folder, file)

# Set current file as read/write in case we extracted with 7-Zip and unlaunch was
# installed in the NAND. Fatcat doesn't keep file attributes
if _7z is not None:
chmod(file, 438)

# Delete current file
remove(file)

# Try to use already downloaded launcher
try:
Expand Down

0 comments on commit 99b461f

Please sign in to comment.