From: minje.ahn Date: Wed, 6 Mar 2024 04:07:16 +0000 (+0900) Subject: Use tzplatform API directly X-Git-Tag: accepted/tizen/unified/20240308.174244~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F96%2F307196%2F1;p=platform%2Fcore%2Fapi%2Fmedia-content.git Use tzplatform API directly Change-Id: I6f6873ac3e05b5138c0605d1de1344a40667d9af Signed-off-by: minje.ahn --- diff --git a/src/media_util_private.c b/src/media_util_private.c index 2a383a8..52c65de 100755 --- a/src/media_util_private.c +++ b/src/media_util_private.c @@ -136,9 +136,9 @@ bool _media_util_is_ignorable_file(const char *path) return true; } #else - if (g_str_has_prefix(tmp_path, MEDIA_SHARE_PATH)) { + if (g_str_has_prefix(tmp_path, tzplatform_getenv(TZ_SYS_MEDIASHARED))) { /* If shared directory, it should be change path to TZ_USER_SHARE from realpath */ - snprintf(replace, MAX_PATH_LEN, "%s%s", tzplatform_getenv(TZ_USER_MEDIASHARED), tmp_path + strlen(MEDIA_SHARE_PATH)); + snprintf(replace, MAX_PATH_LEN, "%s%s", tzplatform_getenv(TZ_USER_MEDIASHARED), tmp_path + strlen(tzplatform_getenv(TZ_SYS_MEDIASHARED))); if (g_strcmp0(replace, org_path) != 0) { content_error("symbolic link(directory)"); content_sec_debug("path[%s] real[%s]", org_path, tmp_path); @@ -259,9 +259,9 @@ int _media_content_check_dir(const char *path) return MEDIA_CONTENT_ERROR_INVALID_PARAMETER; } #else - if (g_str_has_prefix(real, MEDIA_SHARE_PATH)) { + if (g_str_has_prefix(real, tzplatform_getenv(TZ_SYS_MEDIASHARED))) { /* If shared directory, it should be change path to TZ_USER_SHARE from realpath */ - snprintf(result_path, MAX_PATH_LEN, "%s%s", tzplatform_getenv(TZ_USER_MEDIASHARED), real + strlen(MEDIA_SHARE_PATH)); + snprintf(result_path, MAX_PATH_LEN, "%s%s", tzplatform_getenv(TZ_USER_MEDIASHARED), real + strlen(tzplatform_getenv(TZ_SYS_MEDIASHARED))); if (g_strcmp0(result_path, origin) != 0) { content_error("symbolic link(directory)"); content_sec_debug("path[%s] real[%s]", origin, real);