--- loncom/publisher/loncfile.pm 2002/08/05 02:09:05 1.14 +++ loncom/publisher/loncfile.pm 2002/09/02 16:39:15 1.16 @@ -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.16 2002/09/02 16:39:15 harris41 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. @@ -153,7 +155,7 @@ sub Debug { =over 4 -=item The corresponing file system path. +=item The corresponding file system path. =back @@ -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

');