diff options
Diffstat (limited to 'net/disk_cache/entry_impl.cc')
-rw-r--r-- | net/disk_cache/entry_impl.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/entry_impl.cc index 19dcae8..25c6236 100644 --- a/net/disk_cache/entry_impl.cc +++ b/net/disk_cache/entry_impl.cc @@ -331,6 +331,8 @@ int EntryImpl::WriteData(int index, int offset, const char* buf, int buf_len, unreported_size_[index] += offset + buf_len - entry_size; entry_.Data()->data_size[index] = offset + buf_len; entry_.set_modified(); + if (!buf_len) + truncate = true; // Force file extension. } else if (truncate) { // If the size was modified inside PrepareTarget, we should not do // anything here. |