Changeset 33757 for main/trunk/greenstone2/perllib/doc.pm
- Timestamp:
- 2019-12-07T01:40:13+13:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/doc.pm
r33756 r33757 298 298 my @dirs = ($sep eq "\\") ? split(/[\\\/]+/, $dirname) : split(/\//, $dirname); 299 299 300 my $dirpath = ""; 300 my $dirpath = ""; 301 302 # Don't encode the first folder ("import" or "tmp"): GLI's DocXMLFile.java looks for literal "import" 303 # or "tmp" before it knows what the file rename method to be used decode the rest of gsdlsourcefilename is. 304 if(scalar (@dirs) > 1) { 305 $dirpath = shift(@dirs); 306 } 301 307 foreach my $subdir (@dirs) { 302 ##print STDERR "@@@@ Found subdir: $subdir\n"; 303 304 # The import folder can be called anything, including in non-ASCII encodings. 305 # Don't need to avoid encoding default import folder called "import", as it gets 306 # URL/base64 encoded to ITSELF. 307 # But can't encode (URL/base64 encode) any $ENV{'GSDLIMPORTDIR'} though if it's set, 308 # as BasePlugout::get_doc_dir() removes any $ENV{'GSDLIMPORTDIR'} prefix. Because if 309 # the $ENV{'GSDLIMPORTDIR'} part of gsdlsourcefilename is encoded here, the prefix 310 # won't match with $ENV{'GSDLIMPORTDIR'} 311 312 unless ($ENV{'GSDLIMPORTDIR'} && $subdir eq $ENV{'GSDLIMPORTDIR'}) { 313 $subdir = &util::rename_file($subdir, $rename_method); 314 } 308 print STDERR "@@@@ Found subdir: $subdir\n"; 309 310 $subdir = &util::rename_file($subdir, $rename_method); 311 #print STDERR "@@@@ encoded subdir: $subdir\n"; 312 315 313 $dirpath = &FileUtils::filenameConcatenate($dirpath, $subdir); 316 314 }
Note:
See TracChangeset
for help on using the changeset viewer.