diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2012-03-29 00:17:46 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2012-03-29 00:17:46 (GMT) |
commit | 03ee4aa0eecf1a87d0d0da2454c532a38e37a38e (patch) | |
tree | 2a9bda413ca26e0a9131e2c435d2844d915f0f22 /src | |
parent | 068ae2a14f1d884b08185b332ccbfc15e3d87390 (diff) | |
download | hdf5-03ee4aa0eecf1a87d0d0da2454c532a38e37a38e.zip hdf5-03ee4aa0eecf1a87d0d0da2454c532a38e37a38e.tar.gz hdf5-03ee4aa0eecf1a87d0d0da2454c532a38e37a38e.tar.bz2 |
[svn-r22179] Pulled trunk r22178 into 1.8 branch:
Fixed a bad merge where truncate was called twice in the core VFD.
Minor change: tested on jam, koala, ostrich and 64-bit Windows 7 with the core
VFD set.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDcore.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 891c99b..68b9dfc 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -1146,19 +1146,10 @@ if(file->eof < new_eof) if(-1 == HDlseek(file->fd, (HDoff_t)0, SEEK_SET)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position") #endif - if(-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) + if(-1 == HDftruncate(file->fd, (HDoff_t)new_eof)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ -#ifdef H5_VMS - /* Reset seek offset to the beginning of the file, so that the file isn't - * re-extended later. This may happen on Open VMS. */ - if(-1 == HDlseek(file->fd, 0, SEEK_SET)) - HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position") -#endif - - if(-1 == HDftruncate(file->fd, (off_t)new_eof)) - HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") } /* end if */ /* Update the eof value */ |