aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/ose
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/drivers/ose')
-rw-r--r--erts/emulator/drivers/ose/ose_efile.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/erts/emulator/drivers/ose/ose_efile.c b/erts/emulator/drivers/ose/ose_efile.c
index 897d654e89..9980b07817 100644
--- a/erts/emulator/drivers/ose/ose_efile.c
+++ b/erts/emulator/drivers/ose/ose_efile.c
@@ -258,7 +258,11 @@ efile_mkdir(Efile_error* errInfo, /* Where to return error codes. */
#ifdef NO_MKDIR_MODE
return check_error(mkdir(name), errInfo);
#else
- return check_error(mkdir(name, DIR_MODE), errInfo);
+ int res = mkdir(name, DIR_MODE);
+ if (res < 0 && errno == EINVAL) {
+ errno = ENOENT;
+ }
+ return check_error(res, errInfo);
#endif
}