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