When trying to export a diagram with a character that is not permitted in the filesystem an error occurs due to Gaphor trying to use the diagram name as-is in the save dialog.
To Reproduce
Steps to reproduce the behavior:
Go to '≡'
Click on 'Export'
Click on 'Export as SVG'
See error
If possible, add the error report from ≡ (top-right menu) → Tools → Error Reports.
Gaphor version: 2.17.0
Operating System: Windows (10)
Python version: 3.11.2
GTK version: 4.8.3
Adwaita version: 1.2.1
PyGObject version: 3.42.2
Pycairo version: 1.23.0
Cairo version: 1.17.8
Pango version: 1.50.12
Display: GdkWin32Display
Errors:
Time since application startup: 0:23:14
|Traceback (most recent call last):
| File "C:\Program Files\Gaphor\gaphor\ui\actiongroup.pyc", line 191, in _action_activate
| File "C:\Program Files\Gaphor\gaphor\plugins\diagramexport\__init__.pyc", line 55, in save_svg_action
| File "C:\Program Files\Gaphor\gaphor\plugins\diagramexport\__init__.pyc", line 29, in save_dialog
| File "C:\Program Files\Gaphor\pathlib.pyc", line 674, in with_name
|ValueError: Invalid name 'SF View 4a/b - Remote Delivery SoI Option 1'
└─────────────────────────────╌┄┈
Time since application startup: 0:23:23
|Traceback (most recent call last):
| File "C:\Program Files\Gaphor\gaphor\ui\actiongroup.pyc", line 191, in _action_activate
| File "C:\Program Files\Gaphor\gaphor\plugins\diagramexport\__init__.pyc", line 55, in save_svg_action
| File "C:\Program Files\Gaphor\gaphor\plugins\diagramexport\__init__.pyc", line 29, in save_dialog
| File "C:\Program Files\Gaphor\pathlib.pyc", line 674, in with_name
|ValueError: Invalid name 'SF View 4a/b - Remote Delivery SoI Option 1'
└─────────────────────────────╌┄┈
Expected behavior
I would expect the tool to replace or escape the invalid characters in some way for the export filename.
Workaround at the moment is to rename the diagram so the save dialog opens properly but this means you cannot use filesystem invalid characters such as / in your diagram names.
Screenshots
N/A
OS
[ ] Linux (Please put in notes the specific distro)
Describe the bug
When trying to export a diagram with a character that is not permitted in the filesystem an error occurs due to Gaphor trying to use the diagram name as-is in the save dialog.
To Reproduce
Steps to reproduce the behavior:
If possible, add the error report from
≡
(top-right menu) →Tools
→Error Reports
.Expected behavior
I would expect the tool to replace or escape the invalid characters in some way for the export filename. Workaround at the moment is to rename the diagram so the save dialog opens properly but this means you cannot use filesystem invalid characters such as
/
in your diagram names.Screenshots
N/A
OS
Version
Version of Gaphor: 2.17.0
Additional information
Add any other context about the problem here.