fix: Handle both file:// and file:/ URI prefixes

The previous code only stripped file:// (double slash) but some paths
come with file:/ (single slash), causing FileNotFoundException.

Fixes RAILBIRD-FRONTEND-1JH

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Dean
2026-01-06 08:45:39 -08:00
parent 11ce9ba8f6
commit 699481f6f8

View File

@@ -44,7 +44,8 @@ class RecordingSession(
data class Video(val path: String, val durationMs: Long, val size: Size)
// Normalize path - expo-file-system passes file:// URIs but File expects raw paths
private val outputPath: File = File(filePath.removePrefix("file://"))
// Handle both file:// and file:/ variants
private val outputPath: File = File(filePath.replace(Regex("^file:/+"), "/"))
private val bitRate = getBitRate()