Fix duplication of AREASEP and packing of *.msg bases

This commit is contained in:
Alexander S. Aganichev 2002-08-07 07:21:41 +00:00
parent 53be996e1d
commit 53d11a6bce
4 changed files with 34 additions and 7 deletions

View File

@ -12,6 +12,11 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________
! If two AreaSep have the same echotag then they will appear only
once.
- Fixed handling of packed *.msg style messagebases.
- Fixed invalid charset kludge in crossposted messages.
- Fixed handling of 0xe1 character in CP437 (require liblocal 0.2

View File

@ -286,13 +286,21 @@ void AreaList::AddNewArea(AreaCfg* aa) {
area_iterator ap;
for(ap = idx.begin(); ap != idx.end(); ap++) {
++_currarea;
if(not (*ap)->isseparator()) {
int eq_echoid = strieql(aa->echoid, (*ap)->echoid());
int eq_echoid = strieql(aa->echoid, (*ap)->echoid());
if(eq_echoid) {
newarea = false;
if(not (*ap)->isseparator()) {
if(strblank((*ap)->desc()))
strxcpy(desc, aa->desc, sizeof(desc));
}
break;
}
else if(not (*ap)->isseparator()) {
int eq_path = strieql(aa->path, (*ap)->path());
int eq_board = (aa->board == (*ap)->board());
int eq_msgbase = (aa->msgbase == (*ap)->msgbase());
int eq_isfido = (aa->isfido() and (*ap)->isfido());
if(eq_echoid or (eq_path and eq_board and (eq_msgbase or eq_isfido))) {
if(eq_path and eq_board and (eq_msgbase or eq_isfido)) {
// We had it already, so override with the new data
newarea = false;
if(strblank((*ap)->desc()))

View File

@ -172,10 +172,17 @@ void FidoArea::open() {
if(isopen == 1) {
if(ispacked()) {
isopen--;
const char* newpath = Unpack(path());
Path tmp;
strxcpy(tmp, path(), sizeof(Path));
StripBackslash(tmp);
const char* newpath = Unpack(tmp);
if(newpath == NULL)
packed(false);
set_real_path(newpath ? newpath : path());
else {
strcpy(tmp, newpath);
AddBackslash(tmp);
}
set_real_path(newpath ? tmp : path());
isopen++;
}
data_open();

View File

@ -41,10 +41,17 @@ void FidoArea::raw_scan(bool __scanpm) {
if(not _wasopen) {
isopen++;
if(ispacked()) {
const char* newpath = Unpack(path());
Path tmp;
strxcpy(tmp, path(), sizeof(Path));
StripBackslash(tmp);
const char* newpath = Unpack(tmp);
if(newpath == NULL)
packed(false);
set_real_path(newpath ? newpath : path());
else {
strcpy(tmp, newpath);
AddBackslash(tmp);
}
set_real_path(newpath ? tmp : path());
}
}