mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 00:37:09 +00:00
[Support][FileSystem] Fix open mode in resize_file on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169166 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2b8150318d
commit
604db310f0
@ -328,7 +328,7 @@ error_code resize_file(const Twine &path, uint64_t size) {
|
||||
path_utf16))
|
||||
return ec;
|
||||
|
||||
int fd = ::_wopen(path_utf16.begin(), O_BINARY, S_IREAD | S_IWRITE);
|
||||
int fd = ::_wopen(path_utf16.begin(), O_BINARY | _O_RDWR, S_IWRITE);
|
||||
if (fd == -1)
|
||||
return error_code(errno, generic_category());
|
||||
#ifdef HAVE__CHSIZE_S
|
||||
|
Loading…
Reference in New Issue
Block a user