Use tzplatform API directly 98/307198/1
authorminje.ahn <minje.ahn@samsung.com>
Wed, 6 Mar 2024 04:13:07 +0000 (13:13 +0900)
committerminje.ahn <minje.ahn@samsung.com>
Wed, 6 Mar 2024 04:13:07 +0000 (13:13 +0900)
Change-Id: Ice2c3b844c1cbc66f6aa8cb628e4d529c721b6d1
Signed-off-by: minje.ahn <minje.ahn@samsung.com>
src/common/media-svc-media-folder.c

index 0ec8f51..ae09390 100755 (executable)
@@ -91,8 +91,8 @@ static int __media_svc_append_parent_folder(sqlite3 *handle, bool is_direct, con
        char *dir_path = NULL;
        char *internal_path = NULL;
 
-       if (MEDIA_ROOT_PATH_EXTERNAL && g_str_has_prefix(path, MEDIA_ROOT_PATH_EXTERNAL)) {
-               next_pos = strlen(MEDIA_ROOT_PATH_EXTERNAL) + 1;
+       if (g_str_has_prefix(path, tzplatform_getenv(TZ_SYS_STORAGE))) {
+               next_pos = strlen(tzplatform_getenv(TZ_SYS_STORAGE)) + 1;
        } else {
                ret = ms_user_get_internal_root_path(uid, &internal_path);
                media_svc_retvm_if(ret != MS_MEDIA_ERR_NONE, ret, "Fail to get root path");