Changeset 25798

Show
Ignore:
Timestamp:
19.06.2012 21:37:38 (7 years ago)
Author:
ak19
Message:

Fixing bug where on CentOS Linux a call to identify returns 256 and is not the error code for when Imagemagick is not found (on Linux -1 is the error code). Oddly the same issue did not occur on the Ubuntu.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/gsConvert.pl

    r24763 r25798  
    838838    $status >>= 8; 
    839839    $status = (($status & 0x80) ? -(0x100 - ($status & 0xFF)) : $status);    
    840     if ($status == -1 || $status == 1) { #if ($status == -1 || $status == 256) { 
     840    if (($ENV{'GSDLOS'} ne "windows" && $status == -1) || ($ENV{'GSDLOS'} eq "windows" && $status == 1)) {  
     841        # if ($status == -1 || $status == 1) #if ($status == -1 || $status == 256) { 
    841842        #ImageMagick is not installed, thus the convert utility is not available.  
    842         print STDERR "*** ImageMagick is not installed, the convert utility is not available. Unable to convert PDF/PS to images\n"; 
     843        print STDERR "*** ImageMagick is not installed, the convert utility is not available. Unable to convert PDF/PS to images. Status: $status\n"; 
    843844        return 0; 
    844845    }