Auto creating hatch directories
This commit is contained in:
parent
033f9611dd
commit
13de17d424
@ -10,6 +10,7 @@ v0.83.2 16-Nov-2005
|
|||||||
Reinstalled tic orphans and bad crc handling using new method.
|
Reinstalled tic orphans and bad crc handling using new method.
|
||||||
Removed some debug logging.
|
Removed some debug logging.
|
||||||
Now using new tmp workdirectory functions.
|
Now using new tmp workdirectory functions.
|
||||||
|
When a hatch directory doesn't exist, it is created.
|
||||||
|
|
||||||
mbfile:
|
mbfile:
|
||||||
Now using new tmp workdirectory functions.
|
Now using new tmp workdirectory functions.
|
||||||
|
@ -245,7 +245,7 @@ int mkdirs(char *name, mode_t mode)
|
|||||||
if ((last == 0) || (last == EEXIST)) {
|
if ((last == 0) || (last == EEXIST)) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
WriteError("$mkdirs(%s)", name);
|
WriteError("mkdirs(%s)", name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,11 @@ int CheckHatch(char *temp)
|
|||||||
char mask[256];
|
char mask[256];
|
||||||
FILE *Tf;
|
FILE *Tf;
|
||||||
|
|
||||||
|
if (mkdirs(temp, 0775) == FALSE) {
|
||||||
|
WriteError("Can't create dir %s", temp);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
fn = xstrcpy(strrchr(temp, '/') + 1);
|
fn = xstrcpy(strrchr(temp, '/') + 1);
|
||||||
|
|
||||||
while (temp[strlen(temp) -1] != '/')
|
while (temp[strlen(temp) -1] != '/')
|
||||||
|
Reference in New Issue
Block a user