]> git.p6c8.net - devedit.git/blobdiff - modules/Command.pm
File uploads did not work. Fixed in Dev-Editor 2.2a.
[devedit.git] / modules / Command.pm
index 83739f04d475d48c64982b4fb3f3ab43e720182e..da70b349d8e40d7c71b177d4248a3ed173e052c0 100644 (file)
@@ -5,8 +5,8 @@ package Command;
 #
 # Execute Dev-Editor's commands
 #
-# Author:        Patrick Canterino <patshaping@gmx.net>
-# Last modified: 2004-11-26
+# Author:        Patrick Canterino <patrick@patshaping.de>
+# 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))
  {
@@ -484,7 +484,7 @@ sub exec_upload($$)
  my $cgi            = $data->{'cgi'};
 
  return error($config->{'errors'}->{'no_directory'},upper_path($virtual),{FILE => $virtual}) unless(-d $physical);
- return error($config->{'errors'}->{'dir_no_create'},$virtual,{DIR => $virtual});
+ return error($config->{'errors'}->{'dir_no_create'},$virtual,{DIR => $virtual})             unless(-w $physical);
 
  if(my $uploaded_file = $cgi->param('uploaded_file'))
  {

patrick-canterino.de