Commit 2d54cd8e authored by Shane Snyder's avatar Shane Snyder
Browse files

Merge branch 'carns/dev-278-mk-log-dirs-error' into 'master'

improve error msg if mk-log-dirs fails

Closes #278

See merge request darshan/darshan!71
parents bf5f027a 00519200
......@@ -25,7 +25,12 @@ umask(0);
# go through the end of next year
for ($i=$year; $i<($year+2); $i++)
{
mkdir("$LOGDIR/$i", 0755) or die("Error: could not mkdir $LOGDIR/$i.\n");
if(!mkdir("$LOGDIR/$i", 0755))
{
print STDERR "Error: mkdir($LOGDIR/$i): $!.\n";
print STDERR "Error: please make sure that the $LOGDIR directory already exists and is writeable.\n";
exit(1);
}
for ($j=1; $j<13; $j++)
{
mkdir("$LOGDIR/$i/$j", 0755) or die("Error: could not mkdir $LOGDIR/$i/$j.\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment