Uwe Stöhr wrote: > Am 09.06.2015 um 20:38 schrieb Georg Baum: > >>> Attached is a better patch that does this. It also extends the fix to >>> for libreoffice. >> >> It still has this complicated quoting. I still do not understand why it >> has to be done this way. > > Could you make a proposal to make it simpler?
Fortunately Günter did already make a proposal. I can't test it on windows, but at least it does not destroy the detection on linux. I admit that I was not aware that checkProg() can already handle additional paths for checking, but I would have proposed something roughly similar. >>>> Finally, the interface of getInkscapeBinary() needs to be the same >>>> for windows and unix, having quoted stuff for one OS and not for the >>>> other will lead to bugs. >>> >>> This should now be the case with the attached patch. >> >> At least the function names (e.g. quotedWinPath) suggest that the quoting >> is still windows specific. > > Yes, because this function is only called if the OS is Windows, for all > other OSes no quoting is necessary and the command is output as it is > already the case. Well, I tried to explain why the quoting is _not_ a windows-only thing: Paths with spaces are not only allowed on windows. They are much less common on unix, but they exist. Therefore, if checkProg() has a problem with spaces in paths, then the fix must not be windows specific. With Günters patch this solution is obsolete now, but IMHO it is important to understand that spaces in paths or filenames are not windows-specific. If we handle them incorrectly somehwere, then this wil most likely be detected by windows users, but the fix must not be made for a single OS. Georg