> Am 12.04.2017 um 22:23 schrieb Stephan Witt <st.w...@gmx.net>:
> 
> Am 12.04.2017 um 22:18 schrieb Stephan Witt <st.w...@gmx.net>:
>> 
>> Hi Scott,
>> 
>> it looks like your change c659fd4f742763331a5d1e1d3220fb1a615ef845 
>> removed the tilde expansion of path names from preference files.
>> 
>> Isn’t this a problem on Linux too?
> 
> Sorry, I meant the change before: 9b64d7bd24d606490c344a548fff4b93f837ccaf.

I tried to understand what happens and came to the attached patch as start of a 
solution.
Before going further I’d like to ask if there are other proposals to deal with 
the current situation.

In the past the prefix „~“ for the home directory of the user in preference 
files
was converted to the real name of the home directory at parse time of 
preferences.
This way the path names retrieved from preferences never had this prefix at 
runtime.
Now the situation is different and the consumers of these path settings have to 
deal
with that. My approach to minimize the work is to make the FileName class 
„tilde-aware“.

This solves two problems I found out to verify my proposal.
1. The LyX-Server pipe name is configured with "~/Library/Application 
Support/LyX/.lyxpipe“
in preferences. Without the patch this doesn’t work because of the current 
directory
is placed in front of this path when asking QFileInfo for the absolute path.
2. The „New from template“ dialog is using "~/Library/Application 
Support/LyX/templates“
as base path. Without the patch the current directory is put before too and the 
native file
open dialog starts in nowhere-land.

If nobody has a better idea I’d like to commit my patch. This is a show-stopper 
for 2.3.0.

Stephan

Attachment: handleTildeName.patch
Description: Binary data

Reply via email to