Fix saving of local files.

This commit is contained in:
Solderpunk 2023-11-14 00:29:59 +01:00
parent 588d599cb4
commit e4a44679dc
1 changed files with 2 additions and 1 deletions

View File

@ -1312,7 +1312,8 @@ Use 'ls -l' to see URLs."""
# Don't use _get_active_tmpfile() here, because we want to save the
# "source code" of menus, not the rendered view - this way AV-98
# can navigate to it later.
shutil.copyfile(self.tmp_filename, filename)
src = gi.path if gi.scheme == "file" else self.tmp_filename
shutil.copyfile(src, filename)
print("Saved to %s" % filename)
# Restore gi if necessary