added mode parameter to mkdirs

This commit is contained in:
Michiel Broek
2002-01-19 13:04:55 +00:00
parent b6ff90ffeb
commit 2bdbf7a494
21 changed files with 30 additions and 29 deletions

View File

@@ -575,7 +575,7 @@ char *edit_pth(int y, int x, int l, char *line, char *help)
temp = xstrcat(temp, (char *)"/foobar");
if (access(s, R_OK)) {
if (yes_no((char *)"Path doesn't exist, create"))
if (! mkdirs(temp))
if (! mkdirs(temp, 0775))
errmsg((char *)"Can't create path");
}
}
@@ -602,7 +602,7 @@ char *edit_jam(int y, int x, int l, char *line, char *help)
temp = xstrcpy(s);
temp = xstrcat(temp, (char *)".jhr");
if (access(temp, W_OK)) {
if (mkdirs(s)) {
if (mkdirs(s, 0770)) {
if (yes_no((char *)"Messagebase doesn't exist, create")) {
if (Msg_Open(s))
Msg_Close();

View File

@@ -81,7 +81,7 @@ int CountFilearea(void)
fclose(fil);
chmod(ffile, 0640);
sprintf(ffile, "%s/foobar", area.Path);
mkdirs(ffile);
mkdirs(ffile, 0755);
return 1;
} else
return -1;

View File

@@ -93,7 +93,7 @@ int CountMsgarea(void)
msgs.Ftncode = CHRS_DEFAULT_FTN;
strcpy(msgs.Origin, CFG.origin);
fwrite(&msgs, sizeof(msgs), 1, fil);
mkdirs(msgs.Base);
mkdirs(msgs.Base, 0770);
if (Msg_Open(msgs.Base))
Msg_Close();
memset(&syscon, 0, sizeof(syscon));
@@ -118,7 +118,7 @@ int CountMsgarea(void)
msgs.Rfccode = CHRS_DEFAULT_RFC;
msgs.Ftncode = CHRS_DEFAULT_FTN;
fwrite(&msgs, sizeof(msgs), 1, fil);
mkdirs(msgs.Base);
mkdirs(msgs.Base, 0770);
if (Msg_Open(msgs.Base))
Msg_Close();
for (i = 1; i <= CFG.toss_systems; i++)
@@ -142,7 +142,7 @@ int CountMsgarea(void)
msgs.Rfccode = CHRS_DEFAULT_RFC;
msgs.Ftncode = CHRS_DEFAULT_FTN;
fwrite(&msgs, sizeof(msgs), 1, fil);
mkdirs(msgs.Base);
mkdirs(msgs.Base, 0770);
if (Msg_Open(msgs.Base))
for (i = 1; i <= CFG.toss_systems; i++)
fwrite(&syscon, sizeof(syscon), 1, fil);