Skip to content

Commit

Permalink
H5_OpenFile: Avoid dialog if the file does not exist
Browse files Browse the repository at this point in the history
The /Z does not prevent a dialog, as it is outlined in the help.

So we need to check that the file actually exists before trying to open
it.
  • Loading branch information
t-b committed Mar 1, 2022
1 parent ba13c9f commit f53d9ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions IPNWB_HDF5Helpers.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ threadsafe Function H5_OpenFile(discLocation, [write])
write = 0
endif

#if IgorVersion() >= 9.0
ASSERT_TS(FileExists(discLocation), "H5_OpenFile: HDF5 file does not exist.")
#endif

if(write)
HDF5OpenFile/Z fileID as discLocation
else
Expand Down

0 comments on commit f53d9ae

Please sign in to comment.