[Support][FileSystem] Fix open mode in resize_file on Windows.

llvm-svn: 169166
This commit is contained in:
Michael J. Spencer 2012-12-03 22:09:31 +00:00
parent 1ad8dff4bf
commit 20abb2027f
1 changed files with 1 additions and 1 deletions

View File

@ -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