Changeset 1737


Ignore:
Timestamp:
07/11/11 12:48:50 (7 months ago)
Author:
Tobias Richter
Message:

refs #290

inquirefile works now but it it reports the absolute path
so the tests still fail. Not sure I want to fix that because
it reporting the file it actually found is a bad thing.
Might rather tweak the test to allow for that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/napi5.c

    r1735 r1737  
    611611 
    612612      pFile = NXI5assert (fid); 
    613       if (pFile->iCurrentG <= 0) 
    614       { 
    615           sprintf (pBuffer, "ERROR: no group open for makedata on %s", 
    616               name); 
     613      if (pFile->iCurrentG <= 0) { 
     614          sprintf(pBuffer, "ERROR: no group open for makedata on %s", name); 
    617615          NXReportError( pBuffer); 
    618616          return NX_ERROR; 
    619617      } 
    620618 
    621       if (rank <= 0)  
    622       { 
    623           sprintf (pBuffer, "ERROR: invalid rank specified %s", 
    624               name); 
     619      if (rank <= 0) { 
     620          sprintf (pBuffer, "ERROR: invalid rank specified %s", name); 
    625621          NXReportError( pBuffer); 
    626622          return NX_ERROR; 
     
    716712          } 
    717713          H5Pset_deflate(cparms,compress_level);  
    718           iRet = H5Dcreate (pFile->iCurrentG, (char*)name, datatype1, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT);    
     714          iRet = H5Dcreate(pFile->iCurrentG, (char*)name, datatype1, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT);    
    719715      }  
    720716      else if (compress_type == NX_COMP_NONE)  
     
    729725                  return NX_ERROR; 
    730726              } 
    731               iRet = H5Dcreate (pFile->iCurrentG, (char*)name, datatype1, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT);    
     727              iRet = H5Dcreate(pFile->iCurrentG, (char*)name, datatype1, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT);    
    732728          }  
    733729          else  
    734730          { 
    735               iRet = H5Dcreate (pFile->iCurrentG, (char*)name, datatype1, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); 
     731              iRet = H5Dcreate(pFile->iCurrentG, (char*)name, datatype1, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); 
    736732          }                
    737733      }  
     
    742738          if (iNew < 0)  
    743739          { 
    744               NXReportError( "ERROR: size of chunks could not be set"); 
     740              NXReportError("ERROR: size of chunks could not be set"); 
    745741              return NX_ERROR; 
    746742          } 
    747           iRet = H5Dcreate (pFile->iCurrentG, (char*)name, datatype1, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT); 
     743          iRet = H5Dcreate(pFile->iCurrentG, (char*)name, datatype1, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT); 
    748744 
    749745      }  
     
    20932089     herr_t iRet; 
    20942090     pNexusFile5 pFile; 
     2091     /* char pBuffer[256]; */ 
    20952092 
    20962093     pFile = NXI5assert(fileid); 
     2094/* 
     2095      if (pFile->iCurrentG <= 0) { 
     2096          sprintf(pBuffer, "ERROR: no group open for making external link on %s", name); 
     2097          NXReportError(pBuffer); 
     2098          return NX_ERROR; 
     2099      } 
     2100*/ 
    20972101     iRet = H5Lcreate_external(externalfile, remotetarget, pFile->iFID, name, H5P_DEFAULT, H5P_DEFAULT); 
    20982102     if (iRet < 0) { 
     
    21082112     pNexusFile5 pFile; 
    21092113     ssize_t name_size; 
     2114     hid_t openthing; 
    21102115 
    21112116     pFile = NXI5assert(fileid); 
    2112  
    2113      name_size = H5Fget_name(pFile->iFID, externalfile, filenamelen); 
     2117      if (pFile->iCurrentD > 0) { 
     2118          openthing = pFile->iCurrentD; 
     2119      } else if (pFile->iCurrentG) { 
     2120          openthing = pFile->iCurrentG; 
     2121      } else { 
     2122          openthing = pFile->iFID; 
     2123      } 
     2124 
     2125     name_size = H5Fget_name(openthing, externalfile, filenamelen); 
    21142126 
    21152127     // Check for failure again 
Note: See TracChangeset for help on using the changeset viewer.