mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04: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
9
HISTORY
9
HISTORY
|
|
@ -1,6 +1,15 @@
|
|||
SnapRAID HISTORY
|
||||
================
|
||||
|
||||
3.2 2013/7
|
||||
==========
|
||||
* Fix a directory creation problem in Windows when the "disk" option points to
|
||||
the root directory of a drive. Now SnapRAID won't complain about the
|
||||
inability to create such directory.
|
||||
If you encouter this problem when trying to recover your data, just upgrade
|
||||
to this version, and you'll be able to complete the recovering process.
|
||||
No need to upgrade for platforms different than Windows.
|
||||
|
||||
3.1 2013/5
|
||||
==========
|
||||
* Direct use of Windows API for disk access to improve error reporting.
|
||||
|
|
|
|||
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