Be more safe when Unpacker not found

This commit is contained in:
Alexander S. Aganichev 2001-12-26 13:00:18 +00:00
parent affc602c3e
commit 34270a36bb
9 changed files with 17 additions and 0 deletions

View File

@ -87,6 +87,7 @@ public:
int originno() const { return cfg.originno; }
Attr& attr() { return cfg.attr; }
bool ispacked() const { return cfg.attr.pkd(); }
void packed(bool a) { return cfg.attr.pkd(a); }
bool ascan() { return (bool)cfg.scan; }
bool ascanexcl() { return (bool)cfg.scanexcl; }

View File

@ -341,6 +341,8 @@ void EzycomArea::open() {
if(ispacked()) {
isopen--;
const char* newpath = Unpack(path());
if(newpath == NULL)
packed(false);
set_real_path(newpath ? newpath : path());
isopen++;
}

View File

@ -173,6 +173,8 @@ void FidoArea::open() {
if(ispacked()) {
isopen--;
const char* newpath = Unpack(path());
if(newpath == NULL)
packed(false);
set_real_path(newpath ? newpath : path());
isopen++;
}

View File

@ -96,6 +96,8 @@ void JamArea::open() {
if(ispacked()) {
isopen--;
const char* newpath = Unpack(path());
if(newpath == NULL)
packed(false);
set_real_path(newpath ? newpath : path());
isopen++;
}

View File

@ -184,6 +184,8 @@ void PcbArea::open() {
if(ispacked()) {
isopen--;
const char* newpath = Unpack(path());
if(newpath == NULL)
packed(false);
set_real_path(newpath ? newpath : path());
isopen++;
}

View File

@ -96,6 +96,8 @@ void SMBArea::open() {
if(ispacked()) {
isopen--;
const char* newpath = Unpack(path());
if(newpath == NULL)
packed(false);
set_real_path(newpath ? newpath : path());
isopen++;
}

View File

@ -189,6 +189,8 @@ void SquishArea::open() {
if(ispacked()) {
isopen--;
const char* newpath = Unpack(path());
if(newpath == NULL)
packed(false);
set_real_path(newpath ? newpath : path());
isopen++;
}

View File

@ -157,6 +157,8 @@ void WCatArea::open() {
if(ispacked()) {
isopen--;
const char* newpath = Unpack(path());
if(newpath == NULL)
packed(false);
set_real_path(newpath ? newpath : path());
isopen++;
}

View File

@ -201,6 +201,8 @@ void XbbsArea::open() {
if(ispacked()) {
isopen--;
const char* newpath = Unpack(path());
if(newpath == NULL)
packed(false);
set_real_path(newpath ? newpath : path());
isopen++;
}