| 51 | | * this->This() >> file_signature; |
| | 53 | try { |
| | 54 | std::size_t l; |
| | 55 | this->This()->load(l); |
| | 56 | if(l == std::strlen(BOOST_ARCHIVE_SIGNATURE())) { |
| | 57 | // borland de-allocator fixup |
| | 58 | #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) |
| | 59 | if(NULL != file_signature.data()) |
| | 60 | #endif |
| | 61 | file_signature.resize(l); |
| | 62 | // note breaking a rule here - could be a problem on some platform |
| | 63 | if(0 < l) |
| | 64 | this->This()->load_binary(&(*file_signature.begin()), l); |
| | 65 | } |
| | 66 | } |
| | 67 | catch(archive_exception const &) { // catch stream_error archive exceptions |
| | 68 | file_signature = ""; // will cause invalid_signature archive exception to be thrown below |
| | 69 | } |