mirror of
https://github.com/lutris/lutris
synced 2024-07-01 06:34:26 +00:00
Use path_contains to see if one path is 'inside' another, rather than a startswith.
Also resolves #5223 some more
This commit is contained in:
parent
9c7f04138f
commit
696863bee4
|
@ -1038,7 +1038,7 @@ class Game:
|
|||
old_location = self.directory
|
||||
target_directory = self._get_move_target_directory(new_location)
|
||||
|
||||
if new_location.startswith(old_location):
|
||||
if system.path_contains(old_location, new_location):
|
||||
raise InvalidGameMoveError(
|
||||
_("Lutris can't move '%s' to a location inside of itself, '%s'.") % (old_location, new_location)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user