fix: preserve per-file diagnostic failures

This commit is contained in:
Kurt Himebauch committed 2026-11-05 15:14:23 -05:00
1 parent 285ff7956b
commit a431c40b1b
2 files changed
+30 -1

No files matched your search

@@ -390,8 +390,9 @@ internal object EnhancedSessionLogShare {
Snapshot(target, size, size > limit)
} ?: target.delete().let { null }
} catch (e: Exception) {
val targetWasPresent = target.exists()
target.delete()
if (!stage.isDirectory || !stage.canWrite() || !target.exists()) throw StageUnavailableException(e)
if (!stage.isDirectory || !stage.canWrite() || !targetWasPresent) throw StageUnavailableException(e)
throw e
}
}