← Back to team overview

kicad-developers team mailing list archive

Re: [patch] default kicad_common to environment variables

 

wxFileName makes some "choices". i.e. its constructor/assignment takes
the string and tries to separate file from path.

in the case of wxFileName = "helloworld"; it assumes its a filename
in the case of wxFileName = "/helloworld", it assumes its a file name
in the case of wxFilename = "helloworld/"; it assumes its a folder

and of course AppendDir adds a directory the path and because filename
is separate from directory, the end behavior is what you say. (i.e.
directory gets concatted before file)


The proper solution to fix this would be to GetPathSeparator() and
append it to the environment variable string after reading but before
assigning it to the tmpFileName, thus creating
double slashes in the worst case but wxFileName should clean that out.
I'll add it to the patch later tonight if need be.


Follow ups

References