Changeset 7048


Ignore:
Timestamp:
2004-03-15T23:08:23+13:00 (20 years ago)
Author:
mdewsnip
Message:

Now checks for the .xrf file required by the IsisGdl program. Also, bails out if the associated .fdt and .xrf files don't have lowercase extensions (this is a limitation of the IsisGdl program). This is pretty crappy but it should only be an issue on Unix, where the solution should be obvious.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/ISISPlug.pm

    r7021 r7048  
    117117    my ($databasename) = ($filename =~ /([^\.]+)\.mst$/i);
    118118
     119    # Check the associated .fdt and .xrf files exist
     120    # These files must have a lowercase extension for the IsisGdl program to work
     121    # Bailing out because of this is kind of crappy but it is only an issue on Unix
     122    my $fdtfilename = $databasename . ".fdt";
     123    if (! -e $fdtfilename) {
     124    die "Error: Could not find ISIS FDT file $fdtfilename (lowercase extension important).\n";
     125    }
     126    my $xrffilename = $databasename . ".xrf";
     127    if (! -e $xrffilename) {
     128    die "Error: Could not find ISIS XRF file $xrffilename (lowercase extension important).\n";
     129    }
     130
    119131    # The text to split is exported from the database by the IsisGdl program
    120132    open(FILE, "IsisGdl \"$filename\" |");
     
    128140
    129141    # Parse the associated ISIS database Field Definition Table file (.fdt)
    130     my $fdtfilename = $databasename . ".fdt";
    131142    my %fdtmapping = &parse_field_definition_table($fdtfilename);
    132143
Note: See TracChangeset for help on using the changeset viewer.