The filename from commandline argument is being processed directly, without first resolving symlinks. This leads to bug #1567, where Geany fails to open existing file, if it is being opened using path containing symlink and relative directories.
Windows counterpart of this code actually resolves the links, I have just corrected the non-win branch. This fixes the bug described in the bug report and should not have any unwanted side-effects.
Similar problem might (or might not) be also present in two other functions that use utils_tidy_path, without resolving the symlinks first: - in `document_new_file` at [src/document.c:832](https://github.com/geany/geany/blob/b524a58e12e85c94a32f64fb72615978b2628af1...) - in `get_custom_plugin_path` at [src/plugins.c:1009](https://github.com/geany/geany/blob/b524a58e12e85c94a32f64fb72615978b2628af1...)
I'm not sure if it is appropriate to check and possibly fix those in the same PR. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3036
-- Commit Summary --
* resolve symlink before the path is tidied (#1567)
-- File Changes --
M src/document.c (2)
-- Patch Links --
https://github.com/geany/geany/pull/3036.patch https://github.com/geany/geany/pull/3036.diff
github-comments@lists.geany.org