[PATCH] mc crashes when temporary directory cannot be created

Leonard den Ottolander leonard at den.ottolander.nl
Wed Nov 29 19:59:28 UTC 2006


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?

Bye,
Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research

-------------- next part --------------
A non-text attachment was scrubbed...
Name: util.c.diff
Type: text/x-patch
Size: 730 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20061129/5f81ab78/attachment.bin>


More information about the mc-devel mailing list