- Allow to save an empty file
# Execute Dev-Editor's commands
#
# Author: Patrick Canterino <patrick@patshaping.de>
# Execute Dev-Editor's commands
#
# Author: Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2005-04-09
+# Last modified: 2005-04-10
my $md5sum = $cgi->param('md5sum');
my $output;
my $md5sum = $cgi->param('md5sum');
my $output;
- if($content && $md5sum)
+ if(defined $content && $md5sum)
local *FILE;
sysopen(FILE,$physical,O_RDWR | O_CREAT) or return error($config->{'errors'}->{'edit_failed'},$dir,{FILE => $virtual});
local *FILE;
sysopen(FILE,$physical,O_RDWR | O_CREAT) or return error($config->{'errors'}->{'edit_failed'},$dir,{FILE => $virtual});
- file_lock(FILE,LOCK_EX) or do { close(FILE); return error($config->{'errors'}->{'edit_failed'},$dir,{FILE => $virtual}) };
+ file_lock(*FILE,LOCK_EX) or do { close(FILE); return error($config->{'errors'}->{'edit_failed'},$dir,{FILE => $virtual}) };
binmode(FILE);
my $md5 = new Digest::MD5;
binmode(FILE);
my $md5 = new Digest::MD5;