Changeset 23371 for main/trunk/greenstone2/perllib/util.pm
- Timestamp:
- 2010-12-02T00:36:37+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/util.pm
r23362 r23371 1030 1030 my ($filename,$within_dir) = @_; 1031 1031 1032 my $dirsep = &util::get_dirsep();1033 if ($within_dir !~ m/$dirsep$/) { 1032 if ($within_dir !~ m/[\/\\]$/) { 1033 my $dirsep = &util::get_dirsep(); 1034 1034 $within_dir .= $dirsep; 1035 1035 } 1036 1036 1037 1037 $within_dir =~ s/\\/\\\\/g; # escape DOS style file separator 1038 1038 1039 1039 if ($filename =~ m/^$within_dir(.*)$/) { 1040 1040 $filename = $1; … … 1093 1093 sub upgrade_if_dos_filename 1094 1094 { 1095 my ($filename_full_path ) = @_;1095 my ($filename_full_path,$and_encode) = @_; 1096 1096 1097 1097 if ($ENV{'GSDLOS'} =~ m/^windows$/i) { … … 1102 1102 # Make sure initial drive letter is lower-case (to fit in with rest of Greenstone) 1103 1103 $filename_full_path =~ s/^(.)/\l$1/; 1104 if ((defined $and_encode) && ($and_encode)) { 1105 $filename_full_path = encode("utf8",$filename_full_path); 1106 } 1104 1107 } 1105 1108
Note:
See TracChangeset
for help on using the changeset viewer.