diff --git a/ModUpdater.py b/ModUpdater.py index d000882..500738b 100644 --- a/ModUpdater.py +++ b/ModUpdater.py @@ -12,6 +12,7 @@ QHBoxLayout, QMessageBox import shutil +# Build with pyinstaller --onefile --icon=app.ico ModUpdater.py class GitCloneThread(QThread): """Thread to handle the Git clone operation so it doesn't block the UI.""" @@ -151,7 +152,6 @@ def delete_mods_folder(self): print(f"Deleting {mods_folder}") try: self.remove_read_only_attribute(os.path.expanduser("~/AppData/Roaming/.minecraft/mods/.git/objects/pack")) - except: pass shutil.rmtree(mods_folder) @@ -225,6 +225,7 @@ def update_mods(self): mods_folder = os.path.join(self.mods_path, 'mods') try: repo = git.Repo(mods_folder) + repo.git.checkout('--', '.') repo.remotes.origin.pull() print("Repository updated successfully.") except git.exc.GitCommandError as e: