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);
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);