- Timestamp:
- 2013-05-29T20:41:13+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/ConvertBinaryFile.pm
r26893 r27509 45 45 no strict 'subs'; 46 46 use util; 47 use FileUtils; 47 48 48 49 … … 108 109 my $colplugname = undef; 109 110 if (defined $ENV{'GSDLCOLLECTDIR'}) { 110 $colplugname = & util::filename_cat($ENV{'GSDLCOLLECTDIR'},111 $colplugname = &FileUtils::filenameConcatenate($ENV{'GSDLCOLLECTDIR'}, 111 112 "perllib","plugins", 112 113 $plugin_package); 113 114 } 114 115 115 my $mainplugname = & util::filename_cat($ENV{'GSDLHOME'},116 my $mainplugname = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, 116 117 "perllib","plugins", 117 118 $plugin_package); … … 255 256 256 257 my $lc_suffix = lc($suffix); 257 my $tmp_filename = & util::filename_cat($tmp_dirname, "$utf8_tailname$lc_suffix");258 my $tmp_filename = &FileUtils::filenameConcatenate($tmp_dirname, "$utf8_tailname$lc_suffix"); 258 259 259 260 # If gsdl is remote, we're given relative path to input file, of the form import/tailname.suffix … … 261 262 # the input_filename is the absolute path, see http://perldoc.perl.org/File/Spec.html 262 263 my $ensure_path_absolute = 1; # true 263 & util::soft_link($input_filename, $tmp_filename, $ensure_path_absolute);264 &FileUtils::softLink($input_filename, $tmp_filename, $ensure_path_absolute); 264 265 my $verbosity = $self->{'verbosity'}; 265 266 if ($verbosity > 0) { … … 267 268 } 268 269 269 my $errlog = & util::filename_cat($tmp_dirname, "err.log");270 my $errlog = &FileUtils::filenameConcatenate($tmp_dirname, "err.log"); 270 271 271 272 # Execute the conversion command and get the type of the result, … … 290 291 291 292 # remove symbolic link to original file 292 & util::rm($tmp_filename);293 &FileUtils::removeFiles($tmp_filename); 293 294 294 295 # Check STDERR here … … 307 308 close ERRLOG; 308 309 } 309 & util::rm("$errlog") if (-e "$errlog");310 &FileUtils::removeFiles("$errlog") if (-e "$errlog"); 310 311 return ""; 311 312 } … … 364 365 } 365 366 else { 366 & util::mv("${conv_filename}.tmp", $conv_filename);367 &FileUtils::moveFiles("${conv_filename}.tmp", $conv_filename); 367 368 } 368 369 } … … 460 461 # associate original file with doc object 461 462 my $cursection = $doc_obj->get_top_section(); 462 my $filename = & util::filename_cat($base_dir, $file);463 my $filename = &FileUtils::filenameConcatenate($base_dir, $file); 463 464 my $assocfilename = "doc.$doc_ext"; 464 465 if ($self->{'keep_original_filename'} == 1) { … … 489 490 if (defined $tmp_dir && -d $tmp_dir) { 490 491 ##print STDERR "**** Suppressing clean up of tmp dir\n"; 491 & util::rm_r($tmp_dir);492 &FileUtils::removeFilesRecursive($tmp_dir); 492 493 $self->{'tmp_dir'} = undef; 493 494 }
Note:
See TracChangeset
for help on using the changeset viewer.