[LON-CAPA-cvs] cvs: loncom /publisher lonpubdir.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 05 Jan 2004 22:13:16 -0000
albertel Mon Jan 5 17:13:16 2004 EDT
Modified files:
/loncom/publisher lonpubdir.pm
Log:
- regexp would blow up on directories named 'break(things'
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.55 loncom/publisher/lonpubdir.pm:1.56
--- loncom/publisher/lonpubdir.pm:1.55 Sat Jan 3 19:50:11 2004
+++ loncom/publisher/lonpubdir.pm Mon Jan 5 17:13:16 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.55 2004/01/04 00:50:11 www Exp $
+# $Id: lonpubdir.pm,v 1.56 2004/01/05 22:13:16 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -271,12 +271,12 @@
($dirname eq '.')) {
my $kaputt=0;
foreach (keys %{$bombs}) {
- if ($_=~/^$resdir\/$disfilename\//) { $kaputt=1; last; }
+ if ($_=~m:^\Q$resdir\E/\Q$disfilename\E/:) { $kaputt=1; last; }
}
%Apache::lonpublisher::metadatafields=();
%Apache::lonpublisher::metadatakeys=();
my $construct=$here;
- $construct=~s/^\/priv\/(\w+)$/\/home\/$1\/public_html/;
+ $construct=~s:^/priv/(\w+)$:/home/$1/public_html:;
&Apache::lonpublisher::metaeval(&Apache::lonnet::getfile(
$construct.'/'.$dirname.'/default.meta'
));