mirror of
https://github.com/lutris/lutris
synced 2024-09-04 23:13:35 +00:00
Fix installer file copy method.
The copy should copy the dest-file setting faithfully, not sometimes resolve the cache path.
This commit is contained in:
parent
ea278e8b2c
commit
a7df45d24e
|
@ -24,7 +24,7 @@ class InstallerFile:
|
|||
def copy(self):
|
||||
"""Copies this file object, so the copy can be modified safely."""
|
||||
if isinstance(self._file_meta, dict):
|
||||
return InstallerFile(self.game_slug, self.id, self._file_meta.copy(), self.dest_file)
|
||||
return InstallerFile(self.game_slug, self.id, self._file_meta.copy(), self._dest_file)
|
||||
|
||||
return InstallerFile(self.game_slug, self.id, self._file_meta, self._dest_file)
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class InstallerFileCollection:
|
|||
new_file_list = []
|
||||
for file in self.files_list:
|
||||
new_file_list.append(file.copy())
|
||||
return InstallerFileCollection(self.game_slug, self.id, new_file_list, self.dest_file)
|
||||
return InstallerFileCollection(self.game_slug, self.id, new_file_list, self._dest_file)
|
||||
|
||||
@property
|
||||
def dest_file(self):
|
||||
|
@ -160,7 +160,8 @@ class InstallerFileCollection:
|
|||
def is_cached(self):
|
||||
"""Are the files available in the local PGA cache?"""
|
||||
if self.uses_pga_cache():
|
||||
# check if every file is on cache
|
||||
# check if every file is on cache, without checking
|
||||
# uses_pga_cache() on each.
|
||||
for installer_file in self.files_list:
|
||||
if not system.path_exists(installer_file.dest_file):
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue