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

@@ -361,7 +361,7 @@ int main(int argc, char *argv[])
p = xstrcpy(inbound);
p = xstrcat(p,(char *)"/tmp/fooinb");
mkdirs(p);
mkdirs(p, 0700);
free(p);
maxrc=0;

View File

@@ -1,11 +1,10 @@
/*****************************************************************************
*
* File ..................: mbcico/openfile.c
* $Id$
* Purpose ...............: Fidonet mailer
* Last modification date : 12-May-2001
*
*****************************************************************************
* Copyright (C) 1997-2001
* Copyright (C) 1997-2002
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -170,7 +169,7 @@ FILE *openfile(char *fname, time_t remtime, off_t remsize, off_t *resofs, int(*r
* and try again.
*/
if ((infp = fopen(infpath,opentype)) == NULL) {
mkdirs(infpath);
mkdirs(infpath, 0770);
if ((infp = fopen(infpath, opentype)) == NULL) {
WriteError("$Cannot open local file \"%s\" for \"%s\"", infpath,opentype);
free(infpath);

View File

@@ -71,7 +71,7 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo
* Create a fake filename, mkdirs() likes that.
*/
sprintf(fname, "%s/foo", dname);
(void)mkdirs(fname);
(void)mkdirs(fname, 0770);
if ((dp = opendir(dname)) == NULL) {
Syslog('o' ,"\"%s\" cannot be opened, proceed",MBSE_SS(dname));
return 0;