summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-07-30 21:41:23 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-07-30 21:41:23 (GMT)
commit147522bb6118ec82f087208d5caa046f57ff801d (patch)
treefdc57bdc084da094731012092ba137336f75baf3 /test/h5test.c
parent4d080e50f6bde9746d2dc12ced01d7f5758965cb (diff)
downloadhdf5-147522bb6118ec82f087208d5caa046f57ff801d.zip
hdf5-147522bb6118ec82f087208d5caa046f57ff801d.tar.gz
hdf5-147522bb6118ec82f087208d5caa046f57ff801d.tar.bz2
[svn-r23948] Bring revisions #23670 - 23713 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 91497e3..32d78bd 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1124,24 +1124,8 @@ h5_make_local_copy(const char *origfilename, const char *local_copy_name)
{
int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */
ssize_t nread; /* Number of bytes read in */
- char buf[READ_BUF_SIZE]; /* Buffer for copying data */
- char filename[FILENAME_BUF_SIZE] = "";
-#ifdef H5_VMS
- HDstrcat(filename, origfilename);
-#else
- const char * srcdir = HDgetenv("srcdir"); /* The source directory */
-
- /* Check for using the srcdir from configure time */
- if(NULL == srcdir)
- srcdir = config_srcdir;
-
- if(srcdir && ((HDstrlen(srcdir) +
- HDstrlen(origfilename) + 6) < FILENAME_BUF_SIZE)) {
- HDstrcpy(filename, srcdir);
- HDstrcat(filename, "/");
- }
- HDstrcat(filename, origfilename);
-#endif
+ char buf[READ_BUF_SIZE]; /* Buffer for copying data */
+ const char *filename = H5_get_srcdir_filename(origfilename);; /* Get the test file name to copy */
/* Copy old file into temporary file */
if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0) return -1;