Store the real/final output filename so that we can notify it correctly to the user

This commit is contained in:
Gustavo Moreira
2024-05-06 13:11:52 +10:00
parent a6c77c4884
commit d7aae3a982
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -790,8 +790,8 @@ class CommandLine:
return None
self._file.close()
output_filename = self._get_final_filename()
os.rename(self._name, output_filename)
self._output_filename = self._get_final_filename()
os.rename(self._name, self._output_filename)
if direct:
return CLIDirectFileHandler
@@ -119,6 +119,7 @@ class LayerWriter(plugins.PluginInterface):
progress_callback=self._progress_callback,
)
file_handle.close()
output_name = file_handle._output_filename
except IOError as excp:
yield 0, (f"Layer cannot be written to {output_name}: {excp}",)