# HG changeset patch # User Matti Hamalainen # Date 1583359936 -7200 # Node ID 18b7c2c9f8388927a4681f722c9322dc1a053bce # Parent a6e7a29ecd30eb402fa852542ec591025199b104 Oops, fix previous commit. diff -r a6e7a29ecd30 -r 18b7c2c9f838 th_file.c --- a/th_file.c Wed Mar 04 23:39:11 2020 +0200 +++ b/th_file.c Thu Mar 05 00:12:16 2020 +0200 @@ -160,10 +160,6 @@ size_t start = 0, end; BOOL res = FALSE; - // If mode is 0, default to something sensible - if (mode == 0) - mode = 0711; - // Start creating the directory stucture do { @@ -190,7 +186,7 @@ if (!CreateDirectory(path, NULL)) goto error; #else - if (mkdir(path, mode) < 0) + if (mkdir(path, mode != 0 ? mode : 0711) < 0) goto error; #endif }