From 9074a70b0180057d0cebcd667ad7fc813f1aca8c Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Mon, 26 Jun 2023 20:55:28 -0400 Subject: [PATCH] android: Fix size check for content uris Fix for checking file size for android content uris --- src/common/fs/fs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/fs/fs.cpp b/src/common/fs/fs.cpp index 1baf6d7464..36e67c145c 100644 --- a/src/common/fs/fs.cpp +++ b/src/common/fs/fs.cpp @@ -605,6 +605,12 @@ fs::file_type GetEntryType(const fs::path& path) { } u64 GetSize(const fs::path& path) { +#ifdef ANDROID + if (Android::IsContentUri(path)) { + return Android::GetSize(path); + } +#endif + std::error_code ec; const auto file_size = fs::file_size(path, ec);