diff --git a/interfaces/innerkits/native/file_uri/src/file_uri.cpp b/interfaces/innerkits/native/file_uri/src/file_uri.cpp index f48d6e3d2673a4e6243be051f8502ef4984a2e83..abef756080094e5c8f383a5506efe43f44333ca4 100644 --- a/interfaces/innerkits/native/file_uri/src/file_uri.cpp +++ b/interfaces/innerkits/native/file_uri/src/file_uri.cpp @@ -31,7 +31,6 @@ const std::string PATH_SHARE = "/data/storage/el2/share"; const std::string MODE_RW = "/rw/"; const std::string MODE_R = "/r/"; const std::string FILE_SCHEME_PREFIX = "file://"; -const std::string FILE_MANAGER_BASE_PATH = "/storage/Users/"; const std::string FILE_MANAGER_AUTHORITY = "docs"; const std::string MEDIA_AUTHORITY = "media"; string FileUri::GetName() @@ -68,7 +67,7 @@ string FileUri::GetRealPath() string bundleName = uri_.GetAuthority(); LOGD("GetRealPath decode path is %{private}s", sandboxPath.c_str()); if (bundleName == FILE_MANAGER_AUTHORITY && - access(FILE_MANAGER_BASE_PATH.c_str(), F_OK) == 0) { + access(realPath.c_str(), F_OK) == 0) { return realPath; }