Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Unified Diff: runtime/bin/file_win.cc

Issue 76283002: Fix File truncate on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_win.cc
diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc
index 0b63b3d2acfd8a3dead45589caff00491faadfea..4c3c853d5c50b60efbc9c8586d3f2ef0df91cab0 100644
--- a/runtime/bin/file_win.cc
+++ b/runtime/bin/file_win.cc
@@ -86,7 +86,7 @@ bool File::SetPosition(off64_t position) {
bool File::Truncate(off64_t length) {
ASSERT(handle_->fd() >= 0);
- return (_chsize_s(handle_->fd(), length) != -1);
+ return _chsize_s(handle_->fd(), length) == 0;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698