[Github-comments] [geany/geany] Resolve symlink before the path is tidied (#1567) (PR #3036)

Jan Dolinár notifications at xxxxx
Wed Dec 1 05:16:29 UTC 2021


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/src/document.c#L832)
 - in `get_custom_plugin_path` at [src/plugins.c:1009](https://github.com/geany/geany/blob/b524a58e12e85c94a32f64fb72615978b2628af1/src/plugins.c#L1009)
 
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

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3036
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211130/27e6b605/attachment.htm>


More information about the Github-comments mailing list