version 1.47, 2003/12/15 20:44:06
|
version 1.48, 2003/12/15 22:01:14
|
Line 858 sub Delete2 {
|
Line 858 sub Delete2 {
|
if(@files) { |
if(@files) { |
$request->print('<font color="red"> '.&mt('Error: Directory Non Empty').'</font>'); |
$request->print('<font color="red"> '.&mt('Error: Directory Non Empty').'</font>'); |
return 0; |
return 0; |
} |
} else { |
else { |
|
if(-e $filename) { |
if(-e $filename) { |
unless(rmdir($filename)) { |
unless(rmdir($filename)) { |
$request->print('<font color="red">'.&mt('Error').': '.$!.'</font>'); |
$request->print('<font color="red">'.&mt('Error').': '.$!.'</font>'); |
return 0; |
return 0; |
} |
} |
} |
} else { |
else { |
$request->print('<p> '.&mt('No such file').'. </p></form>'); |
$request->print('<p> '.&mt('No such file').'. </p></form'); |
|
return 0; |
return 0; |
} |
} |
|
|
} |
} |
|
} else { |
} |
|
else { |
|
if(-e $filename) { |
if(-e $filename) { |
unless(unlink($filename)) { |
unless(unlink($filename)) { |
$request->print('<font color="red">'.&mt('Error').': '.$!.'</font>'); |
$request->print('<font color="red">'.&mt('Error').': '.$!.'</font>'); |
return 0; |
return 0; |
} |
} |
} |
} else { |
else { |
$request->print('<p> '.&mt('No such file').'. </p></form>'); |
$request->print('<p> '.&mt('No such file').'. </p></form'); |
|
return 0; |
return 0; |
} |
} |
} |
} |
Line 1029 sub phasetwo {
|
Line 1023 sub phasetwo {
|
$main=$2; # Filename. |
$main=$2; # Filename. |
} |
} |
if($main=~m:\.(\w+)$:){ # Fixes problems with filenames with no extensions |
if($main=~m:\.(\w+)$:){ # Fixes problems with filenames with no extensions |
$main=$`; |
$main=$`; #This is what is before the match (.) so it's just the main filename, yea it's nasty |
$suffix=$1; |
$suffix=$1; #This is the actually filename extension if it exists |
} |
} |
my $dest; # On success this is where we'll go. |
my $dest; # On success this is where we'll go. |
|
|