Ensure base cache path exists before calculating disk cache capacity
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Apr 2020 10:29:49 +0000 (10:29 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Apr 2020 10:29:49 +0000 (10:29 +0000)
commitbdc5e22705cc22f45af56b7f4dd758bd9c169acb
tree5ee481c9105534e511ea0358f53d3d1cee867a94
parent4cd336f1670f2140cf57b28200a17b36ea12c2dd
Ensure base cache path exists before calculating disk cache capacity
https://bugs.webkit.org/show_bug.cgi?id=209338

Reviewed by Adrian Perez de Castro.

The base cache path might not exist yet in Cache::open() since it's Storage::open() the one calling
FileSystem::makeAllDirectories() with the final cache directory. In such case, computeCapacity() fails because
FileSystem::getVolumeFreeSpace() needs an existing file.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::open):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@259712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/cache/NetworkCache.cpp