use backend->access in IOR source
Signed-off-by: Julian M. Kunkel <juliankunkel@googlemail.com>master
parent
8069e018e3
commit
0052bff3e9
10
src/ior.c
10
src/ior.c
|
@ -1238,7 +1238,7 @@ static void RemoveFile(char *testFileName, int filePerProc, IOR_param_t * test)
|
|||
rankOffset = 0;
|
||||
GetTestFileName(testFileName, test);
|
||||
}
|
||||
if (access(testFileName, F_OK) == 0) {
|
||||
if (backend->access(testFileName, F_OK, test) == 0) {
|
||||
backend->delete(testFileName, test);
|
||||
}
|
||||
if (test->reorderTasksRandom == TRUE) {
|
||||
|
@ -1246,13 +1246,7 @@ static void RemoveFile(char *testFileName, int filePerProc, IOR_param_t * test)
|
|||
GetTestFileName(testFileName, test);
|
||||
}
|
||||
} else {
|
||||
// BUG: "access()" assumes a POSIX filesystem. Maybe use
|
||||
// backend->get_file_size(), instead, (and catch
|
||||
// errors), or extend the aiori struct to include
|
||||
// something to safely check for existence of the
|
||||
// "file".
|
||||
//
|
||||
if ((rank == 0) && (access(testFileName, F_OK) == 0)) {
|
||||
if ((rank == 0) && (backend->access(testFileName, F_OK, test) == 0)) {
|
||||
backend->delete(testFileName, test);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue