X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/73f2498331782691215bb4cc02fc4431145b7027..28756a17617639eff8ce8d5014d3ec0acdd146d2:/devedit.pl diff --git a/devedit.pl b/devedit.pl index aa7a3ca..3ec92df 100644 --- a/devedit.pl +++ b/devedit.pl @@ -6,7 +6,7 @@ # Dev-Editor's main program # # Author: Patrick Canterino -# Last modified: 2004-11-13 +# Last modified: 2004-11-26 # use strict; @@ -82,6 +82,14 @@ if($newfile ne '' && $newfile !~ /^\s+$/) abort($config->{'errors'}->{'create_ar'},"/"); } + # Check if we have enough permissions to create a file + # in this directory + + unless(-r $new_physical && -w $new_physical && -x $new_physical) + { + abort($config->{'errors'}->{'dir_no_create'},"/",{DIR => $new_virtual}); + } + # Create the physical and the virtual path $new_physical = File::Spec->canonpath($new_physical."/".$file);