Fix move when deleting all games
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from shutil import copyfile, move
|
from shutil import move
|
||||||
|
|
||||||
from gi.repository import Adw, Gio, GLib, Gtk
|
from gi.repository import Adw, Gio, GLib, Gtk
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ class PreferencesWindow(Adw.PreferencesWindow):
|
|||||||
if not cover_path.is_file():
|
if not cover_path.is_file():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
move(cover_path, self.win.covers_dir, copyfile)
|
move(cover_path, self.win.covers_dir / cover_path.name)
|
||||||
|
|
||||||
self.win.update_games(self.removed_games)
|
self.win.update_games(self.removed_games)
|
||||||
self.removed_games = []
|
self.removed_games = []
|
||||||
@@ -370,7 +370,7 @@ class PreferencesWindow(Adw.PreferencesWindow):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if cover_path.is_file():
|
if cover_path.is_file():
|
||||||
move(cover_path, deleted_covers_dir, copyfile)
|
move(cover_path, deleted_covers_dir / cover_path.name)
|
||||||
|
|
||||||
self.win.update_games(self.win.games)
|
self.win.update_games(self.win.games)
|
||||||
if self.win.stack.get_visible_child() == self.win.details_view:
|
if self.win.stack.get_visible_child() == self.win.details_view:
|
||||||
|
|||||||
Reference in New Issue
Block a user