Skip to content
Snippets Groups Projects
Commit bc2eda0f authored by rswindell's avatar rswindell
Browse files

Fixed issues with newly created or imported subs and dirs being re-sorted by

index (the sub/dir constructor wasn't setting the initial subnum/dirnum
property).
parent 7bbc0a11
Branches
Tags
No related merge requests found
......@@ -88,6 +88,7 @@ bool new_sub(unsigned new_subnum, unsigned group_num)
cfg.qhub[q]->sub[s]++;
#endif
new_subboard->subnum = new_subnum;
cfg.sub[new_subnum] = new_subboard;
cfg.total_subs++;
return true;
......
......@@ -72,6 +72,7 @@ static bool new_dir(unsigned new_dirnum, unsigned libnum)
for (unsigned u = cfg.total_dirs; u > new_dirnum; u--)
cfg.dir[u] = cfg.dir[u - 1];
new_directory->dirnum = new_dirnum;
cfg.dir[new_dirnum] = new_directory;
cfg.total_dirs++;
return true;
......@@ -900,7 +901,7 @@ void xfer_cfg()
uifc.changes=1;
}
fclose(stream);
if(ported)
if(ported && cfg.lib[i]->sort)
sort_dirs(i);
uifc.pop(0);
sprintf(str,"%lu File Areas Imported Successfully (%lu added)",ported, added);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment