--- loncom/imspackages/imsprocessor.pm	2008/08/23 17:47:44	1.42
+++ loncom/imspackages/imsprocessor.pm	2008/08/23 21:08:29	1.43
@@ -409,7 +409,7 @@ sub target_resources {
 }
 
 sub copy_resources {
-    my ($context,$cms,$hrefs,$tempdir,$targets,$url,$crs,$cdom,$destdir,$timenow,$assessmentfiles) = @_;
+    my ($context,$cms,$hrefs,$tempdir,$targets,$url,$crs,$cdom,$destdir,$timenow,$assessmentfiles,$total) = @_;
     if ($context eq 'DOCS') {
         foreach my $key (sort keys %{$hrefs}) {
             if (grep/^$key$/,@{$targets}) {
@@ -472,7 +472,11 @@ sub copy_resources {
                         } elsif ($cms eq 'bb5' || $cms eq 'bb6') {
                             $renameres = rename("$tempdir/$key/$file","$destdir/resfiles/$key/$file");
                         }
-                        if (!$renameres) {
+                        if ($renameres) {
+                            if (ref($total) eq 'HASH') {
+                                $$total{'file'} ++;
+                            }
+                        } else {
                             &Apache::lonnet::logthis("IMS import error: $cms - renaming failed for file $file");
                         }
                     } elsif ($cms eq 'webctce4') {
@@ -491,7 +495,11 @@ sub copy_resources {
                             }
                             if (-e "$tempdir/$file") {
                                 my $renameres = rename("$tempdir/$file","$destdir/resfiles/$copyfile");
-                                if (!$renameres) {
+                                if ($renameres) {
+                                    if (ref($total) eq 'HASH') {
+                                        $$total{'file'} ++;
+                                    }
+                                } else {
                                     &Apache::lonnet::logthis("IMS import error: WebCT4 - renaming failed for file $file");
                                 }
                             }