Skip to content

Commit 3af0a65

Browse files
author
Michael Paquier
committed
Fix create_dir not working properly for OSX
This makes pg_rman working normally, caused by some OS-related subtility...
1 parent ef59f85 commit 3af0a65

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dir.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,13 @@ dir_create_dir(const char *dir, mode_t mode)
4242

4343
strncpy(copy, dir, MAXPGPATH);
4444
parent = dirname(copy);
45+
46+
/* Create parent first */
4547
if (access(parent, F_OK) == -1)
4648
dir_create_dir(parent, mode);
47-
#ifdef MACOS
49+
50+
/* Create directory */
51+
#ifdef __darwin__
4852
if (mkdir(copy, mode) == -1)
4953
#else
5054
if (mkdir(dir, mode) == -1)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy