--- loncom/lonnet/perl/lonnet.pm	2002/10/01 19:09:27	1.289
+++ loncom/lonnet/perl/lonnet.pm	2002/10/03 15:04:29	1.290
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.289 2002/10/01 19:09:27 bowersj2 Exp $
+# $Id: lonnet.pm,v 1.290 2002/10/03 15:04:29 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -652,7 +652,7 @@ sub subscribe {
     $author=~s/\/home\/httpd\/html\/res\/([^\/]*)\/([^\/]*).*/$1\/$2/;
     my ($udom,$uname)=split(/\//,$author);
     my $home=homeserver($uname,$udom);
-    if (($home eq 'no_host') || ($home eq $perlvar{'lonHostID'})) { 
+    if ($home eq 'no_host') { 
         return 'not_found'; 
     }
     my $answer=reply("sub:$fname",$home);
@@ -683,6 +683,11 @@ sub repcopy {
     } elsif ($remoteurl eq 'directory') {
            return OK;
     } else {
+        my $author=$filename;
+        $author=~s/\/home\/httpd\/html\/res\/([^\/]*)\/([^\/]*).*/$1\/$2/;
+        my ($udom,$uname)=split(/\//,$author);
+        my $home=homeserver($uname,$udom);
+        unless ($home eq $perlvar{'lonHostID'}) {
            my @parts=split(/\//,$filename);
            my $path="/$parts[1]/$parts[2]/$parts[3]/$parts[4]";
            if ($path ne "$perlvar{'lonDocRoot'}/res") {
@@ -718,6 +723,7 @@ sub repcopy {
                rename($transname,$filename);
                return OK;
            }
+       }
     }
 }