--- loncom/publisher/loncfile.pm 2011/10/24 22:39:21 1.111 +++ loncom/publisher/loncfile.pm 2011/10/30 19:27:27 1.112 @@ -9,7 +9,7 @@ # and displays a page showing the results of the action. # # -# $Id: loncfile.pm,v 1.111 2011/10/24 22:39:21 www Exp $ +# $Id: loncfile.pm,v 1.112 2011/10/30 19:27:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -188,8 +188,9 @@ sub display { sub obsolete_unpub { my ($user,$domain,$construct)=@_; + my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; my $published=$construct; - $published=~s/^\/home\/httpd\/html\/priv\//\/home\/httpd\/html\/res\//; + $published=~s{^\Q$londocroot/priv/\E}{$londocroot/res/}; if (-e $published) { if (&Apache::lonnet::metadata($published,'obsolete')) { return 1; @@ -270,8 +271,9 @@ sub exists { my ($user, $domain, $construct, $creating) = @_; $creating ||= 'file'; + my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; my $published=$construct; - $published=~s{^/home/httpd/html/priv/}{/home/httpd/html/res/}; + $published=~s{^\Q$londocroot/priv/\E}{$londocroot/res/}; my ($type,$result); if ( -d $construct ) { return ('error','

'.&mt('Error: destination for operation is an existing directory.').'

');