Skip to content

Draft: Relative symlinks


  • Let's say the current working dir is /home/abc. Now there is a file in /home/abc .
  • Now I create a symlink using ln -s .
  • Since I am not creating the symlink with absolute path, when thunar calls for this symlink target it only gets instead of /home/abc/ . So this path is now being regarded as a relative path.
  • So if a g_file_new_for_path is called using this path then the return value would be /path/from/where/thunar/started/ in this case.


Check validity of the generated target from g_file_info_get_symlink_target and if wrong then generate the target path using the symlink-files parent path. If this relative symlink path is wrong (Also set this relative path as symlink_target_path if file exists/correct ?) then return NULL.

Related MR: !227 (merged)

As suggested by @MShrimp4 in the MR !227 (merged), I have opened this new MR since this is a general problem and distinguishable from the issue (#71 (closed)) MR !227 (merged) is solving.

Merge request reports