Changeset 35452


Ignore:
Timestamp:
2021-09-22T17:43:39+12:00 (3 years ago)
Author:
anupama
Message:

Committing newly added subroutine get_first_existing_dir(list_of_dirs) that is now used in OpenOfficeConverter.pm whose modifications are to be committed next

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/util.pm

    r34895 r35452  
    18601860}
    18611861
     1862# Returns the first directory in parameter list of directories that exists, undef if none existed
     1863sub get_first_existing_dir {
     1864    my @directories = @_;
     1865   
     1866    foreach my $directory (@directories) {
     1867        if(&FileUtils::directoryExists($directory)) {
     1868            return $directory;
     1869        }
     1870    }   
     1871    return undef;
     1872}
     1873
     1874
    18621875# Sets the gnomelib_env. Based on the logic in wvware.pl which can perhaps be replaced with a call to this function in future
    18631876sub set_gnomelib_env
Note: See TracChangeset for help on using the changeset viewer.