Skip to content

Commit 2076622

Browse files
authored
Merge pull request #2238 from edgargabriel/pr/delete-error-codes
update the error codes reported by file_delete
2 parents 028e747 + 74441b9 commit 2076622

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ompi/mca/io/ompio/io_ompio_file_open.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,14 @@ int mca_io_ompio_file_delete (const char *filename,
113113
*/
114114
ret = unlink(filename);
115115

116-
if (0 > ret && ENOENT != errno ) {
117-
opal_output (1, "errno = %d %s\n", errno, strerror(errno));
118-
return MPI_ERR_ACCESS;
116+
if (0 > ret ) {
117+
if ( ENOENT == errno ) {
118+
// opal_output (1, "errno = %d %s\n", errno, strerror(errno));
119+
return MPI_ERR_NO_SUCH_FILE;
120+
} else {
121+
opal_output (1, "errno = %d %s\n", errno, strerror(errno));
122+
return MPI_ERR_ACCESS;
123+
}
119124
}
120125

121126
return OMPI_SUCCESS;

0 commit comments

Comments
 (0)