Add support for relative path to key-file in SFTP config

Discuss new features and functions
Posts: 44
Joined: 14 Aug 2022

daviank

As of today, the path to the key-file in the SFTP configuration is always an absolute path.

This can be problematic when sharing the ffs-gui file accross multiple OS (eg. linux ←→ windows), or when the mount-point of the ffs-gui file changes

Would it be possible to have a relative path instead, especially when the key-file is in the same folder or subfolder as the ffs-gui file? I mean relative to the location of the ffs_gui file.

Ideally, the relative path would be "OS"-independent. I mean: a "/" would be converted to "\" if run from windows, and a "\" would be converted to "/" in unix-like OSes. Since "\" could mean "escape character" on linux, maybe another character should be considered in that case. I don't know how this could be feasible.

If not possible, simply allowing for a relative path, when key-file is in the same folder as the ffs-gui file would already be useful and permit to share the ffs-gui (with SFTP key file) file accross OSes.

It seems, as of today (v13.7) when I set only the filename of the key-file (without path) in the field holding the path to the key file, it prefixes it (at the time of saving the SFTP config dialog) with the path returned by
Zstring fff::getResourceDirPath()