ganttproject icon indicating copy to clipboard operation
ganttproject copied to clipboard

Issues when there are spaces and exclamations in paths

Open dbarashev opened this issue 4 years ago • 2 comments

There are reports that GP won't work properly when user's home directory contains spaces

https://help.ganttproject.biz/t/first-time-users-java-error-cant-save-files/3750

Similar issue can be seen on Linux when there are spaces in either user's home or in the current working directory path.

dbarashev avatar Oct 25 '21 14:10 dbarashev

It seems that the issue in the linked discussion was exactly with the exclamation sign. Spaces are no problem on Windows (but they do cause issues on Linux). However, the exclamation sign in the user home directory path is the issue, and it starts firing when there are update jars in the update directory (that is, when classloader actually tries to read them). Exclamation has a special meaning for Java class loader.

dbarashev avatar Oct 25 '21 17:10 dbarashev

Issues with spaces on Linux will be fixed in 3.2, but exclamations at the last position of a directory name are a more complicated case. Long story short, it is an old bug in Java that is not going to be fixed and for which there is no workaround.

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4523159 https://stackoverflow.com/questions/17466261/unable-to-open-resources-in-directories-which-end-with-an-exclamation-mark

In theory, it is possible to rewrite those parts of GanttProject code or installation which may break because of this, but it is quite a lot of work which makes things more difficult without any clear benefits. It might be easier to convince those one or two users who have trailing exclamations in their home directory names to rename their home directories.

dbarashev avatar Jan 24 '22 16:01 dbarashev