X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/73f2498331782691215bb4cc02fc4431145b7027..95df6a6a2bb9185cceb1fcf205b4f9f07690ca27:/devedit.pl?ds=sidebyside diff --git a/devedit.pl b/devedit.pl index aa7a3ca..44ced92 100644 --- a/devedit.pl +++ b/devedit.pl @@ -1,12 +1,12 @@ #!C:/Programme/Perl/bin/perl.exe -w # -# Dev-Editor 2.1a +# Dev-Editor 2.2a # # Dev-Editor's main program # -# Author: Patrick Canterino -# Last modified: 2004-11-13 +# Author: Patrick Canterino +# Last modified: 2004-11-26 # use strict; @@ -23,7 +23,7 @@ use Command; use Output; use Tool; -$VERSION = '2.1a'; +$VERSION = '2.2a'; # Path to configuration file # Change if necessary! @@ -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);