On Wed, 29 Nov 2006, Leonard den Ottolander wrote:

> Hello Jindrich,
>
> On Tue, 2006-11-28 at 13:21 +0100, Jindrich Novy wrote:
>> IMO only removal of the fallback will prevent
>> the infinite loop in any case as it shouldn't call mc_mkstemps() at all.
>
> That cure seems worse than the disease. Isn't the real problem the fact
> that mc_mkstemps() blindly concats tmpdir to the prefix instead of
> testing if mc_tmpdir() succeeded? Why not abort mc_mkstemps() if
> mc_tmpdir() returns "/dev/null/"?
>
> What about the attached (untested) patch?
>
> By the way, could you please add the -p option to your diffs?

There is an even simpler cure. In mc_tmpdir() when executing
the fallback code pass an absolute path to mc_mkstemps().
This will prevent the loop. However I am not yet conviced
that this is the best solution. I am still investigating.

_______________________________________________
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel

Reply via email to