return ret;
}
-static void __ms_trim_path(const char *input_path, char **output_path)
-{
- char buf[4096] = {0, };
- char tmp[4096] = {0, };
- char *pos = NULL;
-
- SAFE_STRLCPY(buf, input_path, sizeof(buf));
-
- while ((pos = strstr(buf, "//")) != NULL) {
- memset(tmp, 0, sizeof(tmp));
- SAFE_STRLCPY(tmp, buf, pos - buf + 1);
- SAFE_STRLCAT(tmp, pos + 1, sizeof(tmp));
-
- memset(buf, 0, sizeof(buf));
- SAFE_STRLCPY(buf, tmp, sizeof(buf));
- }
-
- if (g_str_has_suffix(buf, "/"))
- *output_path = g_strndup(buf, strlen(buf) - 1);
- else
- *output_path = g_strdup(buf);
-}
-
int ms_check_scan_ignore(char * path, uid_t uid)
{
int ret = MS_MEDIA_ERR_NONE;
/* Check for symbolic link */
tmp_path = realpath(path, NULL);
/* Get trimmed path */
- __ms_trim_path(path, &org_path);
+ org_path = g_canonicalize_filename(path, NULL);
#ifdef _USE_TVPD_MODE
if (g_strcmp0(tmp_path, org_path) != 0) {