--- loncom/publisher/loncfile.pm 2002/08/05 02:09:05 1.14 +++ loncom/publisher/loncfile.pm 2002/08/24 03:56:58 1.15 @@ -7,10 +7,10 @@ # 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.14 2002/08/05 02:09:05 foxr Exp $ +# $Id: loncfile.pm,v 1.15 2002/08/24 03:56:58 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -86,10 +86,12 @@ package Apache::loncfile; use strict; use Apache::File; +use File::Basename; use File::Copy; use Apache::Constants qw(:common :http :methods); use Apache::loncacc; use Apache::Log (); +use Apache::lonnet; my $DEBUG=0; my $r; # Needs to be global for some stuff RF. @@ -1016,6 +1018,12 @@ sub phasetwo { &Debug($r, "Final url is: $dest"); $dest =~ s/\/home\//\/priv\//; $dest =~ s/\/public_html//; + + my $base = &Apache::lonnet::escape(&File::Basename::basename($dest)); + my $dpath= &File::Basename::dirname($dest); + $dest = $dpath.'/'.$base; + + &Debug($r, "Final url after rewrite: $dest"); $r->print('

Done

');