From 2c10721c6927a7218078d9902c3238b81692ebd6 Mon Sep 17 00:00:00 2001 From: "mmoss@google.com" Date: Tue, 9 Sep 2008 19:51:18 +0000 Subject: Fix Linux buildbot breakage on BlockFiles_Grow due to lingering cache files. The buildbot was breaking because temporary cache files were being created under /tmp, like "/tmp/cache_test\data_*", rather than under /tmp/cache_test, like "/tmp/cache_test/data_*". This prevented the files from being cleaned up when /tmp/cache_test was deleted, and after a few runs, the max of 256 cache files was reached, and the tests failed when they couldn't create more. The following changes were made: - Replace '\' with platform-dependent path separator in various places. - Define constant (same as Windows) for invalid Linux file handle to fix error where wrong value was tested. - Force cache initialization in block_files tests, otherwise it fails to create cache files after calling DeleteCache(). BUG=1917 Review URL: http://codereview.chromium.org/1840 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1918 0039d316-1c4b-4281-b951-d872f2087c98 --- net/disk_cache/backend_impl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'net/disk_cache/backend_impl.cc') diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index f5a8d0a..f0733a7 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -524,8 +524,9 @@ std::wstring BackendImpl::GetFileName(Addr address) const { return std::wstring(); } - std::wstring name = StringPrintf(L"%ls\\f_%06x", path_.c_str(), - address.FileNumber()); + std::wstring name(path_); + std::wstring tmp = StringPrintf(L"f_%06x", address.FileNumber()); + file_util::AppendToPath(&name, tmp); return name; } @@ -1111,4 +1112,3 @@ bool BackendImpl::CheckEntry(EntryImpl* cache_entry) { } } // namespace disk_cache - -- cgit v1.1