Opened 15 years ago
Closed 15 years ago
#1232 closed Bugs (fixed)
mapped_file_source::is_open() is broken under windows
Reported by: | Owned by: | Jonathan Turkanis | |
---|---|---|---|
Milestone: | To Be Determined | Component: | iostreams |
Version: | Boost 1.34.1 | Severity: | Problem |
Keywords: | Cc: |
Description
Under windows, mapped_file_impl::handle_ gets set to INVALID_HANDLE_VALUE when the file gets closed or on error. But mapped_file_source::is_open() incorrectly assumes that if the handle is invalid it will have a value of zero and it doesn't consider INVALID_HANDLE_VALUE a possibility. Obviously, adding INVALID_HANDLE_VALUE to mapped_file_source::is_open() would be poor design. A better way would be to explose a mapped_file_impl::is_valid() method that works as it should depending on the platform and have mapped_file_source::is_open() call it.
Regards,
Steven Burns
Change History (2)
comment:1 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
fixed in [42948] in trunk