421 |
error("could not change directory; %s\n", |
error("could not change directory; %s\n", |
422 |
strerror(errno)); |
strerror(errno)); |
423 |
|
|
424 |
if (!exists_dir(hdn)) |
if (!exists_dir(hdn)) { |
425 |
if (mkdir(hdn, S_IRUSR | S_IWUSR | S_IXUSR)) |
if (mkdir(hdn, S_IRUSR | S_IWUSR | S_IXUSR)) |
426 |
error("could not create directory %s; %s\n", hdn, |
error("could not create directory %s; %s\n", hdn, |
427 |
strerror(errno)); |
strerror(errno)); |
428 |
|
} |
429 |
|
#ifdef CHECK_PERMISSIONS |
430 |
|
else { |
431 |
|
check_dir_perms(hdn, S_IRUSR | S_IWUSR | S_IXUSR); |
432 |
|
} |
433 |
|
#endif |
434 |
|
|
435 |
return 0; |
return 0; |
436 |
} |
} |