harddisks-shareable.diff
This commit is contained in:
parent
fcb9dd34ed
commit
c8380e7d58
@ -197,13 +197,13 @@ std::error_condition osd_file::open(std::string const &path, uint32_t openflags,
|
|||||||
access = (openflags & OPEN_FLAG_READ) ? (GENERIC_READ | GENERIC_WRITE) : GENERIC_WRITE;
|
access = (openflags & OPEN_FLAG_READ) ? (GENERIC_READ | GENERIC_WRITE) : GENERIC_WRITE;
|
||||||
if (is_path_to_physical_drive(path.c_str()))
|
if (is_path_to_physical_drive(path.c_str()))
|
||||||
access |= GENERIC_READ;
|
access |= GENERIC_READ;
|
||||||
sharemode = FILE_SHARE_READ;
|
sharemode = FILE_SHARE_READ | FILE_SHARE_WRITE;
|
||||||
}
|
}
|
||||||
else if (openflags & OPEN_FLAG_READ)
|
else if (openflags & OPEN_FLAG_READ)
|
||||||
{
|
{
|
||||||
disposition = OPEN_EXISTING;
|
disposition = OPEN_EXISTING;
|
||||||
access = GENERIC_READ;
|
access = GENERIC_READ;
|
||||||
sharemode = FILE_SHARE_READ;
|
sharemode = FILE_SHARE_READ | FILE_SHARE_WRITE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -181,13 +181,13 @@ osd_file::error osd_file::open(std::string const &path, uint32_t openflags, ptr
|
|||||||
{
|
{
|
||||||
disposition = (!is_path_to_physical_drive(path.c_str()) && (openflags & OPEN_FLAG_CREATE)) ? CREATE_ALWAYS : OPEN_EXISTING;
|
disposition = (!is_path_to_physical_drive(path.c_str()) && (openflags & OPEN_FLAG_CREATE)) ? CREATE_ALWAYS : OPEN_EXISTING;
|
||||||
access = (openflags & OPEN_FLAG_READ) ? (GENERIC_READ | GENERIC_WRITE) : GENERIC_WRITE;
|
access = (openflags & OPEN_FLAG_READ) ? (GENERIC_READ | GENERIC_WRITE) : GENERIC_WRITE;
|
||||||
sharemode = FILE_SHARE_READ;
|
sharemode = FILE_SHARE_READ | FILE_SHARE_WRITE;
|
||||||
}
|
}
|
||||||
else if (openflags & OPEN_FLAG_READ)
|
else if (openflags & OPEN_FLAG_READ)
|
||||||
{
|
{
|
||||||
disposition = OPEN_EXISTING;
|
disposition = OPEN_EXISTING;
|
||||||
access = GENERIC_READ;
|
access = GENERIC_READ;
|
||||||
sharemode = FILE_SHARE_READ;
|
sharemode = FILE_SHARE_READ | FILE_SHARE_WRITE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user