From: pcanterino <> Date: Mon, 14 Feb 2005 15:33:27 +0000 (+0000) Subject: The file saving process was aborted if the user wanted to write text data using X-Git-Tag: version_2_3_1~2 X-Git-Url: https://git.p6c8.net/devedit.git/commitdiff_plain/2f5a43fa61928517ebeb11e02e2b4c33e9a6ceb8 The file saving process was aborted if the user wanted to write text data using the edit function into a file that does not exists. The reason was that Dev-Editor thought that this non-existing file was a binary file. --- diff --git a/modules/Command.pm b/modules/Command.pm index cd3f6fb..e6491e7 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: 2005-02-12 +# Last modified: 2005-02-14 # use strict; @@ -391,7 +391,7 @@ sub exec_endedit($$) return error($config->{'errors'}->{'link_edit'},$dir) if(-l $physical); return error($config->{'errors'}->{'dir_edit'},$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); + return error($config->{'errors'}->{'text_to_binary'},$dir) if(-e $physical && not -T $physical); if(file_save($physical,\$content)) {