Przeglądaj źródła

Merge pull request #10925 from t895/fs-agony

android: Fix size check for content uris
liamwhite 3 lat temu
rodzic
commit
02882d9251
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      src/common/fs/fs.cpp

+ 6 - 0
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);