On Fri, Jan 04, 2019 at 11:30:08PM +0100, Stephan Witt wrote: > Am 04.01.2019 um 18:54 schrieb Enrico Forestieri <for...@lyx.org>: > > > > On Fri, Jan 04, 2019 at 05:19:57PM +0100, Stephan Witt wrote: > >> Am 04.01.2019 um 17:05 schrieb Enrico Forestieri <for...@lyx.org>: > >>> Then why not using a wrapper that takes the specified paths, makes them > >>> absolute by prefixing the current directory if they are relative and then > >>> calls the inkscape shell script? > >> > >> Because it’s tedious and error prone to handle all possible parameters and > >> care for spaces in path names and don’t change other parameters. > > > > I see. In this case, in order to keep the same meaning, "$$i" and "$$o" > > should always produce relative paths and the code should be audited for > > adding "$$p" where actually needed. > > > The argument from JMarc about possible breaking existing user preferences > is a real strong one. I don’t have a better idea...
Note that we have the pref2prefs.py script for converting user preferences. It would suffice replacing "$$i" with "$$p$$i" and "$$o" with "$$p$$o" where appropriate. So, no breaking would occur. > the attached patch would > be a real pragmatic approach, IMO. Furthermore it gives the possibility to > solve (or hide) the problem in 2.3.x branch too. I really don't like the different meaning that is attached to "$$p" in this case. This is bound to bite in the future. > If this patch is not acceptable I think the next best move is to catch the > relative path names in the Mac specific inkscape wrapper script. Just as you > proposed it. I thought about it and think it’s doable because the calls from > Converters::convert use normalized file names without spaces returned by > DocFileName::mangledFileName. > > What do you think? The wrapper is the quickest solution, maybe, but the unification of the meaning of "$$i" and "$$o" is the cleanest. However, if you do not have time to tackle it, pragmatically, I would say go with the wrapper approach, as this issue has seemingly always been there and only showed in the particular case of the Mac. Yes, this means postponing the problem but we often have to live with compromises. -- Enrico