From f9c7f7df804b1e362de3e8385f95b82fc1210ad7 Mon Sep 17 00:00:00 2001 From: pcanterino <> Date: Mon, 14 Feb 2005 12:45:07 +0000 Subject: [PATCH] Small code cleaning --- devedit.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/devedit.pl b/devedit.pl index 237cf34..54dd3d2 100644 --- a/devedit.pl +++ b/devedit.pl @@ -6,7 +6,7 @@ # Dev-Editor's main program # # Author: Patrick Canterino -# Last modified: 2005-02-13 +# Last modified: 2005-02-14 # use strict; @@ -69,7 +69,9 @@ if($newfile ne '' && $newfile !~ /^\s+$/) # ... check if the directory exists ... - unless(-d clean_path($config->{'fileroot'}.'/'.$dir) && not -l clean_path($config->{'fileroot'}.'/'.$dir)) + my $temp_path = clean_path($config->{'fileroot'}.'/'.$dir); + + unless(-d $temp_path && not -l $temp_path) { abort($config->{'errors'}->{'dir_not_exist'},'/'); } @@ -97,7 +99,9 @@ if($newfile ne '' && $newfile !~ /^\s+$/) # This check has to be performed first or abs_path() will be confused -if(-e clean_path($config->{'fileroot'}.'/'.$file) || -l clean_path($config->{'fileroot'}.'/'.$file)) +my $temp_path = clean_path($config->{'fileroot'}.'/'.$file); + +if(-e $temp_path || -l $temp_path) { if(my ($physical,$virtual) = check_path($config->{'fileroot'},$file)) { -- 2.34.1