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

www lon-capa-cvs@mail.lon-capa.org
Tue, 18 Feb 2003 13:20:14 -0000


www		Tue Feb 18 08:20:14 2003 EDT

  Modified files:              
    /loncom/publisher	lonpublisher.pm 
  Log:
  A file or directory name with "___" would be so bad (symb delimiter) that it 
  is worth blocking in publication.
  
  
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.108 loncom/publisher/lonpublisher.pm:1.109
--- loncom/publisher/lonpublisher.pm:1.108	Mon Feb  3 13:03:53 2003
+++ loncom/publisher/lonpublisher.pm	Tue Feb 18 08:20:13 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.108 2003/02/03 18:03:53 harris41 Exp $
+# $Id: lonpublisher.pm,v 1.109 2003/02/18 13:20:13 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1199,6 +1199,11 @@
     my ($r,$source,$target,$style,$distarget,$batch)=@_;
     $source=~s/\/+/\//g;
     $target=~s/\/+/\//g;
+
+    if ($target=~/\_\_\_/) {
+	return 
+ '<font color=red>Unsupported character combination "<tt>___</tt>" in filename, FAIL</font>';
+    }
     $distarget=~s/\/+/\//g;
     my $logfile;
     unless ($logfile=Apache::File->new('>>'.$source.'.log')) {