Commit e176acbe authored by rswindell's avatar rswindell
Browse files

New MKDIR macro.

parent a9e18584
......@@ -108,7 +108,7 @@ bool sbbs_t::email(int usernumber, char *top, char *subj, long mode)
if(mode&WM_FILE) {
sprintf(str2,"%sfile/%04u.in", cfg.data_dir,usernumber);
_mkdir(str2);
MKDIR(str2);
sprintf(str2,"%sfile/%04u.in/%s", cfg.data_dir,usernumber,title);
if(fexist(str2)) {
bputs(text[FileAlreadyThere]);
......
......@@ -1371,7 +1371,7 @@ int sbbs_t::exec_misc(csi_t* csi, char *path)
if(pp && *pp)
switch(*(csi->ip-5)) {
case MAKE_DIR:
csi->logic=_mkdir(*pp);
csi->logic=MKDIR(*pp);
break;
case REMOVE_DIR:
csi->logic=rmdir(*pp);
......
......@@ -216,7 +216,7 @@ bool sbbs_t::netmail(char *into, char *title, long mode)
if(mode&WM_FILE) {
strcpy(fname,subj);
sprintf(str,"%sfile/%04u.out", cfg.data_dir, useron.number);
_mkdir(str);
MKDIR(str);
strcpy(tmp, cfg.data_dir);
if(tmp[0]=='.') /* Relative path */
sprintf(tmp,"%s%s", cfg.node_dir, cfg.data_dir);
......
......@@ -2980,7 +2980,7 @@ static void ctrl_thread(void* arg)
else /* relative */
sprintf(fname,"%s%s",local_dir,p);
if((i=_mkdir(fname))==0) {
if((i=MKDIR(fname))==0) {
sockprintf(sock,"257 \"%s\" directory created",fname);
lprintf("%04d %s created directory: %s",sock,user.alias,fname);
} else {
......
......@@ -542,7 +542,7 @@ js_mkdir(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
return(JS_TRUE);
}
*rval = BOOLEAN_TO_JSVAL(_mkdir(p)==0);
*rval = BOOLEAN_TO_JSVAL(MKDIR(p)==0);
return(JS_TRUE);
}
......
......@@ -97,7 +97,7 @@ bool sbbs_t::inetmail(char *into, char *subj, long mode)
if(mode&WM_FILE) {
sprintf(str2,"%sfile/%04u.out",cfg.data_dir,useron.number);
_mkdir(str2);
MKDIR(str2);
sprintf(str2,"%sfile/%04u.out/%s",cfg.data_dir,useron.number,title);
if(fexist(str2)) {
bputs(text[FileAlreadyThere]);
......
......@@ -126,7 +126,7 @@ If you want to abort the creation of this new node, hit  ESC .
strcpy(cfg.node_path[i-1],str);
if(str[strlen(str)-1]=='\\' || str[strlen(str)-1]=='/')
str[strlen(str)-1]=0;
_mkdir(str);
MKDIR(str);
cfg.node_num=++cfg.sys_nodes;
sprintf(cfg.node_name,"Node %u",cfg.node_num);
write_node_cfg(&cfg,backup_level);
......
......@@ -257,7 +257,7 @@ bool sbbs_t::unpack_qwk(char *packet,uint hubnum)
while(dir!=NULL && (dirent=readdir(dir))!=NULL) {
// Create directory if necessary
sprintf(str,"%sqnet/%s.in",cfg.data_dir,cfg.qhub[hubnum]->id);
_mkdir(str);
MKDIR(str);
sprintf(str,"%s%s",cfg.temp_dir,dirent->d_name);
if(isdir(str)) /* sub-dir */
continue;
......
......@@ -415,7 +415,7 @@ bool sbbs_t::unpack_rep(char* repfile)
while(dir!=NULL && (dirent=readdir(dir))!=NULL) { /* Extra files */
// Create directory if necessary
sprintf(str,"%sqnet/%s.in",cfg.data_dir,useron.alias);
_mkdir(str);
MKDIR(str);
// Move files
sprintf(str,"%s%s",cfg.temp_dir,dirent->d_name);
if(isdir(str))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment