summaryrefslogtreecommitdiffstats
path: root/src/H5Fint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r--src/H5Fint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 48a8d1f..31f4176 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -1066,7 +1066,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
* Read or write the file superblock, depending on whether the file is
* empty or not.
*/
- if(0 == H5FD_get_eof(lf) && (flags & H5F_ACC_RDWR)) {
+ if(0 == (MAX(H5FD_get_eof(lf, H5FD_MEM_SUPER), H5FD_get_eoa(lf, H5FD_MEM_SUPER))) && (flags & H5F_ACC_RDWR)) {
/*
* We've just opened a fresh new file (or truncated one). We need
* to create & write the superblock.