← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: opening *.pro in current directory gives error message

 

On 28 July 2014 07:16, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:

> On 07/28/2014 08:58 AM, jp charras wrote:
> > Le 28/07/2014 15:20, Dick Hollenbeck a écrit :
> >> Thanks Henner:
> >>
> >> I'll look at this now.  The surprise is the inconsistency of the file
> dialog, which
> >> normally returns a full path, but here not.  An assert would have
> caught that assumption,
> >> my mistake.
> >>
> >> In the multiple open projects scenario, changing the directory (CWD)
> will go away.
> >>
> >> So I won't use your patch as is.  But thanks for the diagnosis.
> >>
> >> PROJECT::SetProjectFullName() requires a full path.  So we'll have to
> come up with that.
> >>
> >> I'll fix this this morning.
> >>
> >> Dick
> >
> > In fact I know one case where a path is not usually given:
> > When you run kicad (and only kicad) by hand from a command line and your
> > command is:
> > kicad myproject.pro
> >
> > and myproject.pro is in the cwd.
> >
>
> Henner,
>
> I was unable to duplicate the wxFileDialog behavior but I believe it could
> be version
> dependent and needs to be guarded against non-the-less.
>

It happened to me when I open kicad on the commandline with a *.pro file in
the same directory (essentially what jp said)
   kicad myproject.pro

in that case it boils down that the kernel is called with
  chdir("");
 (as can be seen with strace)

... which returns the error. Maybe older Linux kernels were permissive
being called with an empty string. Or other operating systems.
In user level that was wxWidgets 3.0.1.


> I also protect against JP's concern in rev 5033.
>
>
> I will look at eeschema and pcbnew separately as part of my big pending
> work.
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References