1
0
Fork 0
mirror of synced 2024-05-18 19:42:54 +12:00

Fix move game on Windows

This commit is contained in:
lennard 2022-09-27 21:09:41 +02:00
parent 8d7bd89d63
commit 24774b07c0
No known key found for this signature in database
GPG key ID: AB6010FE63C7C2B1
2 changed files with 4 additions and 10 deletions

View file

@ -258,7 +258,7 @@ class GameInfo(QWidget, Ui_GameInfo):
self.verify_button.setEnabled(False)
if self.move_game_pop_up.find_mount(dest_path) != self.move_game_pop_up.find_mount(install_path):
if self.move_game_pop_up.is_different_drive(str(dest_path), str(install_path)):
# Destination dir on different drive
self.start_copy_diff_drive()
else:

View file

@ -62,16 +62,9 @@ class MoveGamePopUp(QWidget):
self.move_path_edit.setText(str())
self.move_path_edit.setText(text)
# Thanks to lk.
@staticmethod
def find_mount(path):
mount_point = path
while path != path.anchor:
if path.is_mount():
return path
else:
path = path.parent
return mount_point
def is_different_drive(dir1: str, dir2: str):
return os.stat(dir1).st_dev != os.stat(dir2).st_dev
def edit_func_move_game(self, dir_selected):
self.move_game.setEnabled(True)
@ -149,6 +142,7 @@ class MoveGamePopUp(QWidget):
)
# noinspection PyUnresolvedReferences
class CopyGameInstallation(QRunnable):
class Signals(QObject):
progress = pyqtSignal(int)