Changeset 1755
- Timestamp:
- 2000-12-07T11:45:39+13:00 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/RecPlug.pm
r1710 r1755 69 69 70 70 my (@dir, $subfile); 71 72 71 my $count = 0; 73 72 74 75 73 # see if this is a directory 76 74 my $dirname = &util::filename_cat ($base_dir, $file); 75 76 # check to make sure we're not reading our own archives 77 # or index directory 78 if ($dirname =~ m%^$ENV{'GSDLHOME'}/.*/import.*/(archives|index)$%) { 79 print $outhandle "RecPlug: $dirname appears to be a reference to a Greenstone collection, skipping.\n"; 80 return 1; 81 } 82 83 # check to see we haven't got a cyclic path... 84 if ($dirname =~ m%(/.*){,41}%) { 85 print $outhandle "RecPlug: $dirname is 40 directories deep, is this a recursive path? if not increase constant in RecPlug.pm.\n"; 86 return 1; 87 } 88 89 # check to see we haven't got a cyclic path... 90 if ($dirname =~ m%.*?import/(.+?)/import/\1.*%) { 91 print $outhandle "RecPlug: $dirname appears to a recursive loop ...\n"; 92 return 1; 93 } 94 95 77 96 if (-d $dirname) { 78 97 98 if ($dirname =~ m|/CVS$|) { 99 print $outhandle "RecPlug: $dirname is a CVS directory, skipping.\n"; 100 return 1; 101 } 79 102 # read all the files in the directory 80 103 if (!opendir (DIR, $dirname)) … … 83 106 return; 84 107 } 85 if ($dirname =~ m|/CVS$|) {86 print $outhandle "RecPlug: $dirname is a CVS directory, skipping.\n";87 return 1;88 }89 108 90 109 @dir = readdir (DIR);
Note:
See TracChangeset
for help on using the changeset viewer.