--- loncom/publisher/loncfile.pm 2003/02/04 22:01:38 1.23 +++ loncom/publisher/loncfile.pm 2003/02/10 23:13:17 1.24 @@ -7,10 +7,9 @@ # presents a page that describes the proposed action to the user # and requests confirmation. The second phase commits the action # and displays a page showing the results of the action. -# - # -# $Id: loncfile.pm,v 1.23 2003/02/04 22:01:38 albertel Exp $ +# +# $Id: loncfile.pm,v 1.24 2003/02/10 23:13:17 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -495,6 +494,12 @@ sub Rename1 { if(-e $conspace) { if($ENV{'form.newfilename'}) { my $newfilename = $ENV{'form.newfilename'}; + if ($newfilename =~ m|^[^\.]+$|) { + #no extension add on orignal extension + if ($filename =~ m|/[^\.]*\.([^\.]+)$|) { + $newfilename.='.'.$1; + } + } $request->print(&checksuffix($filename, $newfilename)); my $return=&exists($user, $domain, $dir, $newfilename); $request->print($return);