X-Git-Url: https://git.p6c8.net/devedit.git/blobdiff_plain/d15b21ba0206652d4076dd94d3f68fcf4832fd7a..7ccfda558e4118708d93bde4098fc1552b03a545:/modules/Command.pm diff --git a/modules/Command.pm b/modules/Command.pm index 0ae3416..d0070c4 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-07-20 +# Last modified: 2004-07-22 # use strict; @@ -590,6 +590,7 @@ sub exec_rename($$) my $virtual = $data->{'virtual'}; my $new_physical = $data->{'new_physical'}; + return error($config->{'errors'}->{'rename_root'},"/") if($virtual eq "/"); return error($config->{'errors'}->{'in_use'},upper_path($virtual),{FILE => $virtual}) if($data->{'uselist'}->in_use($virtual)); if($new_physical) @@ -663,6 +664,8 @@ sub exec_remove($$) my $physical = $data->{'physical'}; my $virtual = $data->{'virtual'}; + return error($config->{'errors'}->{'remove_root'},"/") if($virtual eq "/"); + if(-d $physical) { # Remove a directory