瀏覽代碼

Merge pull request #10925 from t895/fs-agony

android: Fix size check for content uris
liamwhite 3 年之前
父節點
當前提交
02882d9251
共有 1 個文件被更改,包括 6 次插入0 次删除
  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);