diff --git a/hphp/runtime/base/file.cpp b/hphp/runtime/base/file.cpp index fd95126d064f03..60d6df08307206 100644 --- a/hphp/runtime/base/file.cpp +++ b/hphp/runtime/base/file.cpp @@ -124,8 +124,9 @@ String File::TranslatePathWithFileCache(const String& filename) { // canonicalize asserts that we don't have nulls String canonicalized = FileUtil::canonicalize(filename); String translated = TranslatePath(canonicalized); - if (!translated.empty() && access(translated.data(), F_OK) < 0 && - StaticContentCache::TheFileCache) { + if (!translated.empty() && + StaticContentCache::TheFileCache && + access(translated.data(), F_OK) < 0) { if (StaticContentCache::TheFileCache->exists(canonicalized.data(), false)) { // we use file cache's file name to make stat() work