summaryrefslogtreecommitdiffstats
path: root/apps/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/misc.c')
-rw-r--r--apps/misc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/misc.c b/apps/misc.c
index eb821548fe..690fb0117f 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -1425,6 +1425,8 @@ int open_pathfmt(char *buf, size_t size, int oflag, const char *pathfmt, ...)
va_start(ap, pathfmt);
vsnprintf(buf, size, pathfmt, ap);
va_end(ap);
+ if ((oflag & O_PATH) == O_PATH)
+ return -1;
return open(buf, oflag, 0666);
}