[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Commit 3144
- Subject: Commit 3144
- From: "David A. Bandel" <..hidden..>
- Date: Sat, 3 Dec 2011 08:49:08 -0500
Just looking at commit 3144:
if(-d "$tempdir"){}
else
{
my $rc=system("mkdir -p $tempdir");#TODO what if error?
seems to me, if we have an error creating a tempdir, we have a larger
problem, i.e., the filesystem where we want to create the tempdir is
mounted read-only or we don't have write permissions (which should
never happen in /tmp).
how about something like:
(-d $tempdir){ (-w $tempdir) || die "$tempdir not writable"; } ||
system("mkdir -p $tempdir") || die "cannot create $tempdir";
my $.02,
David A. Bandel
--
Two things are infinite: the universe and human stupidity; and I'm not
sure about the the universe. -- Albert Einstein
Visit my web page at: http://david.bandel.us/