Commit b2562f9
fix: Stop deleting estimation files on transient errors (#1721)
* fix: Stop deleting estimation files on transient errors
Fixes #1543
Changes:
- Remove destructive File.Delete call that was triggered by any exception
- Validate file name format before parsing (check for '-Sub-' presence)
- Only catch IOException for transient errors (file locked, etc.)
- Skip gracefully on any error instead of deleting potentially valid files
The previous behavior would delete timing estimation files for transient errors
like file locks, causing permanent loss of timing data. Files should only be
overwritten by SaveSubModuleTimeAsync with correct data, not deleted on read errors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: Expand exception handling to include permission errors
Address review feedback - catch additional file access exceptions:
- IOException (file locked, path too long, etc.)
- UnauthorizedAccessException (access denied)
- SecurityException (missing permissions)
Uses exception filter pattern for clean multi-exception handling.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent fba448b commit b2562f9
1 file changed
Lines changed: 12 additions & 3 deletions
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
47 | | - | |
| 56 | + | |
48 | 57 | | |
49 | | - | |
| 58 | + | |
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
| |||
0 commit comments