|
@@ -84,6 +84,7 @@ bool MMap::Map(FileFd &Fd)
|
|
|
if ((Flags & ReadOnly) != ReadOnly)
|
|
if ((Flags & ReadOnly) != ReadOnly)
|
|
|
return _error->Error("Compressed file %s can only be mapped readonly", Fd.Name().c_str());
|
|
return _error->Error("Compressed file %s can only be mapped readonly", Fd.Name().c_str());
|
|
|
Base = new unsigned char[iSize];
|
|
Base = new unsigned char[iSize];
|
|
|
|
|
+ SyncToFd = new FileFd();
|
|
|
if (Fd.Seek(0L) == false || Fd.Read(Base, iSize) == false)
|
|
if (Fd.Seek(0L) == false || Fd.Read(Base, iSize) == false)
|
|
|
return _error->Error("Compressed file %s can't be read into mmap", Fd.Name().c_str());
|
|
return _error->Error("Compressed file %s can't be read into mmap", Fd.Name().c_str());
|
|
|
return true;
|
|
return true;
|