FIx suppression du exe.old

This commit is contained in:
2026-03-24 16:26:33 +01:00
parent 94af36fccf
commit b8776b6594
2 changed files with 13 additions and 1 deletions

View File

@@ -468,9 +468,21 @@ class App(tk.Tk):
self.repo_results = [] self.repo_results = []
log.info(f"=== Demarrage Git Update Checker v{VERSION} ===") log.info(f"=== Demarrage Git Update Checker v{VERSION} ===")
self._cleanup_old_exe()
self._build_ui() self._build_ui()
self.after(100, self._check_self_update_then_repos) self.after(100, self._check_self_update_then_repos)
def _cleanup_old_exe(self):
"""Supprime l'ancien exe .old restant d'une mise a jour precedente."""
if getattr(sys, "frozen", False):
old_path = Path(sys.executable).with_suffix(".exe.old")
if old_path.exists():
try:
old_path.unlink()
log.info(f"Nettoyage: {old_path.name} supprime")
except OSError:
log.warning(f"Nettoyage: impossible de supprimer {old_path.name}")
def _build_ui(self): def _build_ui(self):
style = ttk.Style(self) style = ttk.Style(self)
style.theme_use("clam") style.theme_use("clam")

View File

@@ -1 +1 @@
0.5 0.5.1