mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-26 01:46:32 -05:00
Fixes a directory creation problem in Windows in the root directory.
This commit is contained in:
parent
a3eecd1eae
commit
a8efa5b325
2 changed files with 16 additions and 0 deletions
7
util.c
7
util.c
|
|
@ -696,6 +696,13 @@ int mkancestor(const char* file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
if (strlen(dir) == 2 && dir[1] == ':') {
|
||||
/* it's a drive specification, nothing more to do */
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* try creating it */
|
||||
if (mkdir(dir, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == 0) {
|
||||
/* just created */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue