Remove redundant Codex manual cache directory check (#53780)

`nearestExistingParent` already checks whether the cache path exists and is a directory. Remove the duplicate `stat` check from `usableCacheDir` in the OpenAI docs manual fetcher, retaining the existing parent lookup and write/execute permission checks.

GitOrigin-RevId: 42583353bfdd06881171d8b24fa2b2d5b6fb3135
This commit is contained in:
Konstantine Kahadze
2026-10-13 22:06:50 +00:00
committed by copyberry
parent 20b4ff2f35
commit 8b507a8e45
@@ -242,13 +242,6 @@ const usableCacheDir = async (cacheDir) => {
if (!cacheDir) return null;
const resolved = path.resolve(cacheDir);
try {
const info = await stat(resolved);
if (!info.isDirectory()) return null;
} catch (error) {
if (error?.code !== "ENOENT") return null;
}
const parent = await nearestExistingParent(resolved);
if (!parent) return null;