[PATCH] mc crashes when temporary directory cannot be created

Pavel Tsekov ptsekov at gmx.net
Tue Jan 2 15:56:21 UTC 2007


On Tue, 2007-01-02 at 16:53, Jindrich Novy wrote:

> > >>>> I am attaching a patch which passes an absolute path to mc_mkstemps()
> > >>>> when invoked from mc_tmpdir(). What do you think about this fix ?
> > >>>> I may add a comment why it is necessary to call mc_mkstemps() with
> > >>>> an absolute path. By the way I think we should add a check whether
> > >>>> the environment variable TMPDIR contains an absolute path. Anyway, I'll
> > >>>> leave this for another patch.
> > >>>
> > >>> Thanks for the patch. Do you plan to convert the relative paths to
> > >>> absolute ones when detected?
> > >>
> > >> I think TMPDIR should be ignored in this case. What's your opinion ?
> > >
> > > So some hardcoded value such as "/tmp" will then be assumed in case of
> > > relative path in TMPDIR?
> > 
> > Yep. It already is:
> > 
> >      sys_tmp = getenv ("TMPDIR");
> >      if (!sys_tmp) {
> >          sys_tmp = TMPDIR_DEFAULT;
> >      }
> 
> It sounds good for me then ;-)

The patch is in CVS now. I'll add a check for TMPDIR being an absolute
path later today.





More information about the mc-devel mailing list