| 162 | } |
| 163 | |
| 164 | void ZipObject::closeFile(StreamObject *stream) |
| 165 | { |
| 166 | if(mZipArchive == NULL) |
| 167 | return; |
| 168 | |
| 169 | #ifdef TORQUE_DEBUG |
| 170 | bool found = false; |
| 171 | for(S32 i = 0;i < mStreamPool.size();++i) |
| 172 | { |
| 173 | StreamObject *so = mStreamPool[i]; |
| 174 | if(so && so == stream) |
| 175 | { |
| 176 | found = true; |
| 177 | break; |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | AssertFatal(found, "ZipObject::closeFile() - Attempting to close stream not opened by this ZipObject"); |
| 182 | #endif |
| 183 | |
| 184 | mZipArchive->closeFile(stream->getStream()); |
| 185 | stream->setStream(NULL); |
| 186 | } |
| 187 | |
| 188 | //----------------------------------------------------------------------------- |
| 189 |
no test coverage detected