On Fri Sep 22 2017 16:00:16, Jean-Yves Garneau wrote:
> You can also create preferences file in the same folder as application with Fl_Preferences(".", "VendorName", "AppName").
>
Though be cautious with this, since it uses a relative path “.” rather than a full path, so may depend on the CWD your application gets (at startup or whenever you instantiate the preferences object.)
Now, under Win32, the CWD at startup is generally the same folder the exe resides in, but other WM, and particularly X11 WM’s, may set the CWD differently for various reasons (often security based), so it is not always safe to assume that the CWD is the exe directory...
If I want to do that, I usually use code to ascertain the *actual* home directory for the app and make sure the CWD is set accordingly.