summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/links.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/links.c b/test/links.c
index 594e77e..b7eb6af 100644
--- a/test/links.c
+++ b/test/links.c
@@ -4805,6 +4805,10 @@ external_link_win5(hid_t fapl, hbool_t new_format)
if(NULL == HDgetcwd(cwdpath, (size_t)NAME_BUF_SIZE))
TEST_ERROR
drive = HDgetdrive();
+ if (drive >= 26)
+ drive -= 1; /* account for drive Z */
+ else
+ drive += 1;
/* set up name for main file: "/CWD/extlinks0" */
HDstrcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
@@ -4813,9 +4817,7 @@ external_link_win5(hid_t fapl, hbool_t new_format)
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
/* set up name for target link: "<drive-letter+1>:tmp/extlinks14" */
- if (drive >= 26)
- drive -= 2; /* account for drive Z */
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", ((drive+1)+'A'-1), FILENAME[35]);
+ HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive+'A'-1), FILENAME[35]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp/extlinks14" */
@@ -4904,13 +4906,15 @@ external_link_win6(hid_t fapl, hbool_t new_format)
TEST_ERROR
drive = HDgetdrive();
if (drive >= 26)
- drive -= 2; /* account for drive Z */
+ drive -= 1; /* account for drive Z */
+ else
+ drive += 1;
/* set up name for main file: "extlinks0" */
h5_fixname(FILENAME[12], fapl, filename1, sizeof filename1);
/* set up name for target link: "<drive-letter+1>:tmp/extlinks15" */
- HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", ((drive+1)+'A'-1), FILENAME[36]);
+ HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive+'A'-1), FILENAME[36]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
/* set up name for target file: "tmp/extlinks15" */