From: pcanterino <> Date: Mon, 29 Nov 2004 13:27:09 +0000 (+0000) Subject: This file testing order before saving a file makes more sense X-Git-Tag: version_2_2a~1 X-Git-Url: https://git.p6c8.net/devedit.git/commitdiff_plain/3faa38c832fba17e89c5e3025fd91bd51923cb3b This file testing order before saving a file makes more sense --- diff --git a/modules/Command.pm b/modules/Command.pm index e572fb1..1423442 100644 --- a/modules/Command.pm +++ b/modules/Command.pm @@ -6,7 +6,7 @@ package Command; # Execute Dev-Editor's commands # # Author: Patrick Canterino -# Last modified: 2004-11-26 +# Last modified: 2004-11-29 # use strict; @@ -373,9 +373,9 @@ sub exec_endedit($$) return error($config->{'errors'}->{'in_use'},$dir,{FILE => $virtual}) if($uselist->in_use($virtual)); } - return error($config->{'errors'}->{'text_to_binary'},$dir) unless(-T $physical); return error($config->{'errors'}->{'editdir'},$dir) if(-d $physical); return error($config->{'errors'}->{'no_edit'},$dir) if(-e $physical && !(-r $physical && -w $physical)); + return error($config->{'errors'}->{'text_to_binary'},$dir) unless(-T $physical); if(file_save($physical,\$content)) {