Auto creating hatch directories

This commit is contained in:
Michiel Broek 2005-12-03 15:09:06 +00:00
parent 033f9611dd
commit 13de17d424
3 changed files with 7 additions and 1 deletions

View File

@ -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.

View File

@ -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;
} }
} }

View File

@ -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] != '/')