[LON-CAPA-cvs] cvs: loncom /publisher lonpublisher.pm

raeburn raeburn@source.lon-capa.org
Mon, 09 Mar 2009 20:10:55 -0000


raeburn		Mon Mar  9 20:10:55 2009 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
  Log:
  Existing versioned file which _contains_ name of published file can inflate $maxversion check during phase two.
    - Need to check directory contents for /^RegExp$/, not /RegExp$/.
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.251 loncom/publisher/lonpublisher.pm:1.252
--- loncom/publisher/lonpublisher.pm:1.251	Wed Feb 11 11:49:22 2009
+++ loncom/publisher/lonpublisher.pm	Mon Mar  9 20:10:55 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.251 2009/02/11 11:49:22 schafran Exp $
+# $Id: lonpublisher.pm,v 1.252 2009/03/09 20:10:55 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1652,7 +1652,7 @@
                 unlink($srcd.'/'.$filename);
                 unlink($srcd.'/'.$filename.'.meta');
             } else {
-                if ($filename=~/\Q$srcf\E\.(\d+)\.\Q$srct\E$/) {
+                if ($filename=~/^\Q$srcf\E\.(\d+)\.\Q$srct\E$/) {
                     $maxversion=($1>$maxversion)?$1:$maxversion;
                 }
             }