# Execute Dev-Editor's commands
#
# Author: Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2004-12-28
+# Last modified: 2005-01-05
#
use strict;
my $dir = upper_path($new_virtual);
$new_virtual = encode_entities($new_virtual);
- return error($config->{'errors'}->{'file_exists'},$dir,{FILE => $new_virtual}) if(-e $new_physical);
-
if($new_physical)
{
+ return error($config->{'errors'}->{'file_exists'},$dir,{FILE => $new_virtual}) if(-e $new_physical);
+
mkdir($new_physical,0777) or return error($config->{'errors'}->{'mkdir_failed'},$dir,{DIR => $new_virtual});
return devedit_reload({command => 'show', file => $dir});
}
my $ascii = $cgi->param('ascii');
my $handle = $cgi->upload('uploaded_file');
+ return error($config->{'errors'}->{'invalid_upload'},$virtual) unless($handle);
+
# Read transferred file and write it to disk
read($handle, my $data, -s $handle);