From 699481f6f8cccef73b927d10b94d23816db9f160 Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 6 Jan 2026 08:45:39 -0800 Subject: [PATCH] fix: Handle both file:// and file:/ URI prefixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../src/main/java/com/mrousavy/camera/core/RecordingSession.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/android/src/main/java/com/mrousavy/camera/core/RecordingSession.kt b/package/android/src/main/java/com/mrousavy/camera/core/RecordingSession.kt index 4784904..96047f9 100644 --- a/package/android/src/main/java/com/mrousavy/camera/core/RecordingSession.kt +++ b/package/android/src/main/java/com/mrousavy/camera/core/RecordingSession.kt @@ -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()