mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 15:54:56 +00:00
Dont try and make the "/" directory
This commit is contained in:
parent
61b7904afd
commit
4298e87fa5
@ -41,7 +41,7 @@
|
||||
int make_directory (char *path, long mode, int flags)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
||||
/* Calling apps probably should use 0777 instead of -1
|
||||
* then we dont need this condition
|
||||
*/
|
||||
@ -50,7 +50,7 @@ int make_directory (char *path, long mode, int flags)
|
||||
}
|
||||
if (flags == FILEUTILS_RECUR) {
|
||||
char *pp = strrchr(path, '/');
|
||||
if (pp) {
|
||||
if ((pp) && (pp != path)) {
|
||||
*pp = '\0';
|
||||
make_directory(path, mode, flags);
|
||||
*pp = '/';
|
||||
|
Loading…
Reference in New Issue
Block a user