Skip to content

Commit a29e378

Browse files
author
Sergey Fukanchik
committedSep 18, 2023
PBCKP-698 allow relative paths in dir_create_dir
·
test-2.8.22.5.13
1 parent db12a03 commit a29e378

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ dir_create_dir(const char *dir, mode_t mode, bool strict)
155155
get_parent_directory(parent);
156156

157157
/* Create parent first */
158-
if (access(parent, F_OK) == -1)
158+
if (strlen(parent) > 0 && access(parent, F_OK) == -1)
159159
dir_create_dir(parent, mode, false);
160160

161161
/* Create directory */

0 commit comments

Comments
 (0)
Please sign in to comment.