X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/e04d7759c81d74daee88cf550e900b2cd42edce4..0e297c178531651238c91bc1e62dcb7dd356e541:/devedit.pl diff --git a/devedit.pl b/devedit.pl index 169abc4..eccebd0 100644 --- a/devedit.pl +++ b/devedit.pl @@ -6,7 +6,7 @@ # Dev-Editor's main program # # Author: Patrick Canterino -# Last modified: 2004-10-04 +# Last modified: 2004-11-07 # use strict; @@ -35,6 +35,14 @@ use constant CONFIGFILE => 'devedit.dat'; my $config = read_config(CONFIGFILE); error_template($config->{'templates'}->{'error'}); # Yes, I'm lazy... +# Check if the root directory exists + +abort($config->{'errors'}->{'no_root_dir'}) unless(-d $config->{'fileroot'}); + +# Check if we are able to access the root directory + +abort($config->{'errors'}->{'no_root_access'}) unless(-r $config->{'fileroot'} && -x $config->{'fileroot'}); + # Read the most important form data my $cgi = new CGI;