diff options
Diffstat (limited to 'net/disk_cache/file_posix.cc')
-rw-r--r-- | net/disk_cache/file_posix.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/disk_cache/file_posix.cc b/net/disk_cache/file_posix.cc index 087ff13..6f78b7a 100644 --- a/net/disk_cache/file_posix.cc +++ b/net/disk_cache/file_posix.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -260,7 +260,9 @@ bool File::SetLength(size_t length) { size_t File::GetLength() { DCHECK(init_); - size_t ret = lseek(platform_file_, 0, SEEK_END); + off_t ret = lseek(platform_file_, 0, SEEK_END); + if (ret < 0) + return 0; return ret; } |