-
- if (dp) closedir(dp);
- dp = NULL;
-
- if (find) {
- *ignore = TRUE;
- break;
- } else {
- /*If root path, Stop Scanning*/
- if ((storage_type == MEDIA_SVC_STORAGE_INTERNAL) && (STRING_VALID(MEDIA_ROOT_PATH_INTERNAL) && strcmp(search_path, MEDIA_ROOT_PATH_INTERNAL) == 0)) {
- break;
- } else if ((storage_type == MEDIA_SVC_STORAGE_EXTERNAL) && (STRING_VALID(MEDIA_ROOT_PATH_SDCARD)) && (strcmp(search_path, MEDIA_ROOT_PATH_SDCARD) == 0)) {
- break;
- } else if ((storage_type == MEDIA_SVC_STORAGE_EXTERNAL_USB) && (STRING_VALID(MEDIA_ROOT_PATH_DISC)) && (strcmp(search_path, MEDIA_ROOT_PATH_DISC) == 0)) {
- break;
- } else if (storage_type == MEDIA_SVC_STORAGE_EXTERNAL_USB) {
- char *parent_folder_path = NULL;
- bool is_root = FALSE;
-
- parent_folder_path = g_path_get_dirname(search_path);
- if (STRING_VALID(MEDIA_ROOT_PATH_USB) && (strcmp(parent_folder_path, MEDIA_ROOT_PATH_USB) == 0))
- is_root = TRUE;
-
- SAFE_FREE(parent_folder_path);
-
- if (is_root == TRUE)
- break;
- }
-#ifdef _USE_SENIOR_MODE
- if (_media_content_is_support_senior_mode()) {
- if ((storage_type == MEDIA_SVC_STORAGE_EXTERNAL) && (strcmp(search_path, MEDIA_ROOT_PATH_SENIOR_MODE) == 0))
- break;
- }
-#endif
-
- leaf_path = strrchr(search_path, '/');
- if (leaf_path != NULL) {
- int seek_len = leaf_path -search_path;
- search_path[seek_len] = '\0';
- /*media_content_sec_debug("go to other dir [%s]", search_path);*/
- } else {
- media_content_debug("Fail to find leaf path");
- break;
- }
+ } else {
+ if (g_strcmp0(tmp_path, org_path) != 0) {
+ content_error("symbolic link(directory)");
+ content_sec_debug("path[%s] real[%s]", org_path, tmp_path);
+ SAFE_FREE(tmp_path);
+ g_free(org_path);
+ return true;