Index: trunk/DataStoreServer/scripts/dsreg
===================================================================
--- trunk/DataStoreServer/scripts/dsreg	(revision 35389)
+++ trunk/DataStoreServer/scripts/dsreg	(revision 37256)
@@ -395,12 +395,23 @@
             # if size was supplied make sure that it matches the actual
             # size
+            my $current_size = $finfo[7];
             if ($file->{bytes}) {
-                my $current_size = $finfo[7];
                 if ($file->{bytes} != $current_size) {
-                    &my_die("size on disk: $current_size does not match supplied"
-                    . " size: $file->{bytes} for $path", $PS_EXIT_PROG_ERROR);
+
+#                   XXX we are getting to many instances where sizes and md5sums change between 
+#                   the time that a job runs and measures the value and when the filesets are registered.
+#                   So far it looks as though the files are actually ok.
+#                   For now just remeasure if size changes. Might want to do something more
+#                   clever and raise an error if the difference is larger than some fraction
+
+#                    &my_die("size on disk: $current_size does not match supplied"
+#                    . " size: $file->{bytes} for $path", $PS_EXIT_PROG_ERROR);
+
+                    print STDERR "\nWarning: size on disk for $path: $current_size does not match supplied size: $file->{bytes}.\nUsing current size.\n";
+                    $file->{bytes} = $current_size;
+                    $file->{md5sum} = undef;
                 }
             } else {
-                $file->{bytes}  = $finfo[7];
+                $file->{bytes}  = $current_size;
             }
             if (!$file->{md5sum}) {
