version 1.70, 2005/07/14 22:49:26
|
version 1.71, 2005/08/16 15:52:08
|
Line 1025 sub Delete2 {
|
Line 1025 sub Delete2 {
|
|
|
=back |
=back |
|
|
Returns 0 failure, and 0 successs. |
Returns 0 failure, and 1 successs. |
|
|
=cut |
=cut |
|
|
Line 1033 sub Copy2 {
|
Line 1033 sub Copy2 {
|
my ($request, $username, $dir, $oldfile, $newfile) = @_; |
my ($request, $username, $dir, $oldfile, $newfile) = @_; |
&Debug($request ,"Will try to copy $oldfile to $newfile"); |
&Debug($request ,"Will try to copy $oldfile to $newfile"); |
if(-e $oldfile) { |
if(-e $oldfile) { |
|
if ($oldfile eq $newfile) { |
|
$request->print('<font color="red"> '.&mt('Warning').': '.&mt('Name of new file is the same as name of old file').' - '.&mt('no action taken').'.</font>'); |
|
return 1; |
|
} |
unless (copy($oldfile, $newfile)) { |
unless (copy($oldfile, $newfile)) { |
$request->print('<font color="red"> '.&mt('copy Error').': '.$!.'</font>'); |
$request->print('<font color="red"> '.&mt('copy Error').': '.$!.'</font>'); |
return 0; |
return 0; |