--- loncom/publisher/loncfile.pm 2003/12/15 20:44:06 1.47 +++ loncom/publisher/loncfile.pm 2003/12/15 22:01:14 1.48 @@ -9,7 +9,7 @@ # and displays a page showing the results of the action. # # -# $Id: loncfile.pm,v 1.47 2003/12/15 20:44:06 sakharuk Exp $ +# $Id: loncfile.pm,v 1.48 2003/12/15 22:01:14 taceyjo1 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -858,31 +858,25 @@ sub Delete2 { if(@files) { $request->print(' '.&mt('Error: Directory Non Empty').''); return 0; - } - else { + } else { if(-e $filename) { unless(rmdir($filename)) { $request->print(''.&mt('Error').': '.$!.''); return 0; } - } - else { - $request->print('

'.&mt('No such file').'.

print('

'.&mt('No such file').'.

'); return 0; } - } - - } - else { + } else { if(-e $filename) { unless(unlink($filename)) { $request->print(''.&mt('Error').': '.$!.''); return 0; } - } - else { - $request->print('

'.&mt('No such file').'.

print('

'.&mt('No such file').'.

'); return 0; } } @@ -1029,8 +1023,8 @@ sub phasetwo { $main=$2; # Filename. } if($main=~m:\.(\w+)$:){ # Fixes problems with filenames with no extensions - $main=$`; - $suffix=$1; + $main=$`; #This is what is before the match (.) so it's just the main filename, yea it's nasty + $suffix=$1; #This is the actually filename extension if it exists } my $dest; # On success this is where we'll go.