Commits (3)
......@@ -1027,10 +1027,11 @@ bool extract_diz(scfg_t* cfg, file_t* f, str_list_t diz_fnames, char* path, size
return false;
}
for(int nested = 0; nested <= 1; nested++) {
if(extract_files_from_archive(archive
,/* outdir: */cfg->temp_dir
,/* allowed_filename_chars: */NULL /* any */
,/* with_path: */true
,/* with_path: */!nested
,/* overwrite: */false
,/* max_files: */strListCount(diz_fnames)
,/* file_list: */diz_fnames
......@@ -1040,8 +1041,10 @@ bool extract_diz(scfg_t* cfg, file_t* f, str_list_t diz_fnames, char* path, size
if(fexistcase(path))
return true;
}
if(nested)
return false;
}
}
char* fext = getfext(f->name);
......
......@@ -66,7 +66,7 @@ FILE* fopen_dstats(scfg_t* cfg, uint node, BOOL for_write)
char path[MAX_PATH+1];
dstats_fname(cfg, node, path, sizeof(path));
return iniOpenFile(path, for_write);
return fnopen(NULL, path, for_write ? O_CREAT|O_RDWR : O_RDONLY);
}
/****************************************************************************/
......@@ -83,7 +83,7 @@ FILE* fopen_cstats(scfg_t* cfg, uint node, BOOL for_write)
/****************************************************************************/
BOOL fclose_dstats(FILE* fp)
{
return iniCloseFile(fp);
return fclose(fp);
}
/****************************************************************************/
......
......@@ -297,7 +297,7 @@ void sbbs_t::xtrndat(const char *name, const char *dropdir, uchar type, ulong tl
strlwr(tmp);
SAFEPRINTF2(str,"%s%s",dropdir,tmp);
(void)removecase(str);
if((fp=fnopen(NULL, str, O_WRONLY|O_CREAT|O_TRUNC)) == NULL) {
if((fp=fnopen(NULL, str, O_WRONLY|O_CREAT|O_TRUNC|O_TEXT)) == NULL) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_TRUNC|O_TEXT);
return;
}
......