Fix File truncate on Windows.
BUG= R=sgjesse@google.com Review URL: https://codereview.chromium.org//76283002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30406 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user