# Dev-Editor's main program
#
# Author: Patrick Canterino <patshaping@gmx.net>
-# Last modified: 2004-11-04
+# Last modified: 2004-11-07
#
use strict;
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'});
mkdir_failed = Could not create directory '{DIR}'.
copy_failed = Could not copy '{FILE}' to '{NEW_FILE}'.
rename_failed = Could not move/rename '{FILE}' to '{NEW_FILE}'.
+no_root_dir = The root directory does not exist or is not a directory.
no_root_access = You have not enough permissions to access the root directory.
above_root = Accessing files and directories above the virtual root directory is forbidden.
create_ar = You aren't allowed to create files and directories above the virtual root directory.