When saving an image via the menu, if a filename is specified without an expected extension (e.g., .jpg, .png, etc.), the application raises a RuntimeError stating it cannot open the file.
Traceback (most recent call last):
File "/home/frimn/genui/src/genui/ui_widgets/photo_viewer.py", line 183, in save_image_manual
self.save_image(file_name)
File "/home/frimn/genui/src/genui/ui_widgets/photo_viewer.py", line 191, in save_image
self._save_metadata_to_image(file_path)
File "/home/frimn/genui/src/genui/ui_widgets/photo_viewer.py", line 197, in _save_metadata_to_image
with pyexiv2.Image(str(file_path)) as img:
File "/home/frimn/genui/.venv/lib/python3.10/site-packages/pyexiv2/core.py", line 14, in __init__
self._exiv2api_image = exiv2api.Image(filename.encode(encoding))
RuntimeError: /home/frimn/test: Failed to open the data source: Нет такого файла или каталога (errno = 2)
Steps to Reproduce:
- Open an image in the application.
- Select "Save Image" from the right-click menu.
- In the save dialog, enter a filename with unexpected or without an extension (e.g.,
test or test.gif instead of test.jpg).
- Click "Save."
When saving an image via the menu, if a filename is specified without an expected extension (e.g., .jpg, .png, etc.), the application raises a
RuntimeErrorstating it cannot open the file.Steps to Reproduce:
testortest.gifinstead oftest.jpg).