summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-28 02:34:37 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-03-28 02:34:37 +0200
commit822ff99e6f6a5c8ad7309a535d384d354b2d326e (patch)
treeaf4774d4846ea340d351fd6c9bb4f5ab2606eb7c
parentba58914cb1476b94d1b6b2e42bc12471c37ea6b3 (diff)
posix.c: Make use of S_ISDIRHEADmaster
-rw-r--r--posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/posix.c b/posix.c
index 4b8fde1..3d698aa 100644
--- a/posix.c
+++ b/posix.c
@@ -27,7 +27,7 @@ int mkdir_r_port(const char *const dir, const int flags)
if (stat(dir, &sb))
return -1;
- else if (!(sb.st_mode & S_IFDIR))
+ else if (!S_ISDIR(sb.st_mode))
{
errno = ENOTDIR;
return -1;