Claude Code Claude Opus 4.6 commited on
Commit
8ebbd80
·
1 Parent(s): 446b8d3

Claude Code: Fix path resolution - check directory is writable

Browse files
Files changed (1) hide show
  1. error_handlers.py +2 -1
error_handlers.py CHANGED
@@ -85,7 +85,8 @@ def _resolve_status_file() -> Path:
85
  # Priority 2: Use OPENCLAW_DATA_DIR (set in Docker)
86
  base_dir = _get_base_dir()
87
  candidate = base_dir / "cain_status.json"
88
- if candidate.parent.exists():
 
89
  return candidate
90
 
91
  # Priority 3: Search relative to this script's location
 
85
  # Priority 2: Use OPENCLAW_DATA_DIR (set in Docker)
86
  base_dir = _get_base_dir()
87
  candidate = base_dir / "cain_status.json"
88
+ # Check if directory is writable (file will be created if needed)
89
+ if candidate.parent.exists() and os.access(candidate.parent, os.W_OK):
90
  return candidate
91
 
92
  # Priority 3: Search relative to this script's location