io_win32: use try_func when dispatching mapped_file
This commit is contained in:
parent
d8f916a25b
commit
2eb1f2b919
15
io_win32.cpp
15
io_win32.cpp
@ -110,13 +110,16 @@ mapped_file::mapped_file (::cruft::win32::handle &&src,
|
|||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
mapped_file::mapped_file (const std::experimental::filesystem::path &path,
|
mapped_file::mapped_file (
|
||||||
|
std::experimental::filesystem::path const &path,
|
||||||
int fflags,
|
int fflags,
|
||||||
int mflags):
|
int mflags
|
||||||
mapped_file (
|
)
|
||||||
|
: mapped_file (
|
||||||
::cruft::win32::handle (
|
::cruft::win32::handle (
|
||||||
::CreateFile (
|
::cruft::win32::error::try_call (
|
||||||
path.string ().c_str (),
|
::CreateFile,
|
||||||
|
path.u8string ().c_str (),
|
||||||
fflags_to_generic (fflags),
|
fflags_to_generic (fflags),
|
||||||
fflags == O_RDONLY ? FILE_SHARE_READ : 0,
|
fflags == O_RDONLY ? FILE_SHARE_READ : 0,
|
||||||
nullptr,
|
nullptr,
|
||||||
@ -127,7 +130,7 @@ mapped_file::mapped_file (const std::experimental::filesystem::path &path,
|
|||||||
),
|
),
|
||||||
fflags,
|
fflags,
|
||||||
mflags
|
mflags
|
||||||
)
|
)
|
||||||
{ ; }
|
{ ; }
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user