← Back to team overview

kicad-developers team mailing list archive

Re: pcbnew fix: project file location

 

Le 11/03/2013 14:42, Sergey A. Borshch a écrit :
Hello everybody.

If pcbnew launched with <board_file>.brd as cmd-line argument (just filename, without absolute path), attempting to load file from current directory, pcbnew loads settings from kicad.pro in the templates directory instead of <board_file>.pro in the current directory.

It happens because pcbnew creates wxFileConfig with <board_file>.pro as local_file constructor argument. According to wxFileConfig documentation it means that config file location will be transformed to ~/.<board_filename>.pro which is not exist, and after failing to read values from this wrong location pcbnew falls back to loading default settings from kicad.pro

In the same launching eeschema correctly detects config file name as <absolute_path>/<sch_file>.pro

Attached path fixes bug by converting <board_file>.pro to <absolute_path>/<board_file>.pro in the same way as eeschema does.

Thanks.
I fixed it in rev 3995.
However there are issues when the board file has no path, not just for the config file, but also when the board filename is stored without path in file history, when attempting to open the file from this file history.
Therefore the fix is made in pcbnew.cpp.

--
Jean-Pierre CHARRAS



References