Pathlib fixes

This commit is contained in:
kramo
2023-04-02 08:06:09 +02:00
parent 960eaa1949
commit 7e968a9ac7
3 changed files with 10 additions and 9 deletions

View File

@@ -41,7 +41,7 @@ class ImportPreferences:
):
def set_dir(_source, result, _unused):
try:
path = window.file_chooser.select_folder_finish(result).get_path()
path = Path(window.file_chooser.select_folder_finish(result).get_path())
def response(widget, response):
if response == "choose_folder":
@@ -62,7 +62,7 @@ class ImportPreferences:
else:
window.schema.set_string(
install_key,
path,
str(path),
)
except GLib.GError:
pass
@@ -224,7 +224,7 @@ class PreferencesWindow(Adw.PreferencesWindow):
else:
self.schema.set_string(
"lutris-cache-location",
path,
str(path),
)
except GLib.GError:
pass