diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2023-11-20 22:31:56 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2023-11-20 22:31:56 -0500 |
commit | 1a75de6b9c1e821fc585e89eb466610c2cbc83b5 (patch) | |
tree | 0f66809355c527889024b154e1aa713c4e8c23fb /src/copy.c | |
parent | 43bcd36bb31c1ab117b54f21746b119db2448449 (diff) | |
download | stasis-1a75de6b9c1e821fc585e89eb466610c2cbc83b5.tar.gz |
Do not produce an error if a path element exists during creation
Diffstat (limited to 'src/copy.c')
-rw-r--r-- | src/copy.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -102,6 +102,11 @@ int mkdirs(const char *_path, mode_t mode) { strcat(result, token); strcat(result, "/"); status = mkdir(result, mode); + if (status && errno == EEXIST) { + status = 0; + errno = 0; + continue; + } } return status; } |