Throw an error if the datadir doesn't exist rather than blindly creating it.

Bug #261616 r=timeless
This commit is contained in:
cls%seawood.org 2004-12-01 00:36:30 +00:00
parent 0b3b8eed19
commit c6e5f68341

View File

@ -518,13 +518,11 @@ sub DataDir {
}
# Make sure it exists...
unless (-d $dir) {
rmtree([$dir], 1, 1);
mkpath([$dir], 0, 0777);
die "Couldn't create '$dir'\n"
unless (-d $dir);
if (! -d $dir) {
print STDERR "No data dir for Tree \"" . &shell_escape($::TreeID) .
"\".\n";
die "Tree is not configured.\n";
}
return $dir;
}