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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user