diff --git a/Common/File/Path.cpp b/Common/File/Path.cpp index 6e141da4b6..71172c5006 100644 --- a/Common/File/Path.cpp +++ b/Common/File/Path.cpp @@ -41,7 +41,9 @@ void Path::Init(std::string_view str) { } else if (startsWith(str, "http://") || startsWith(str, "https://")) { type_ = PathType::HTTP; path_ = str; - } else if (Android_IsContentUri(str)) { + } else if (startsWith(str, "content://")) { + // Recognized on every platform, so code that handles them can be tested anywhere. Elsewhere, file + // operations on them just fail. // Content URIs on non scoped-storage (and possibly other cases?) can contain // "raw:/" URIs inside. This happens when picking the Download folder using the folder browser // on Android 9. diff --git a/Common/File/Path.h b/Common/File/Path.h index 534a93e2a0..7ae4c21bd9 100644 --- a/Common/File/Path.h +++ b/Common/File/Path.h @@ -32,7 +32,7 @@ enum class PathType { UNDEFINED = 0, NATIVE = 1, // Can be relative. - CONTENT_URI = 2, // Android only. Can only be absolute! + CONTENT_URI = 2, // Android storage. Recognized everywhere, but only usable on Android. Can only be absolute! HTTP = 3, // http://, https:// };