+ return statbuf.st_mtime;
+}
+
+bool _media_util_is_ignorable_file(const char *path)
+{
+ char *tmp_path = NULL;
+ char *org_path = NULL;
+
+#ifndef _USE_TVPD_MODE
+ char replace[MAX_PATH_LEN] = {0, };
+#endif
+
+ content_retip_if_fail(STRING_VALID(path));
+
+ /* Check is exist (It may be the path to the deleted file) */
+ if (!g_file_test(path, G_FILE_TEST_EXISTS)) {
+ content_sec_debug("removed path[%s]", path);
+ return false;
+ }
+
+ /* Check symbolic link file */
+ if (g_file_test(path, G_FILE_TEST_IS_SYMLINK)) {
+ content_error("symbolic link(file)");
+ content_sec_debug("path : %s", path);
+ return true;
+ }
+
+ /* Check hidden path */
+ if (strstr(path, "/.") != NULL) {
+ content_error("hidden path");
+ content_sec_debug("path : %s", path);
+ return true;
+ }
+
+ /* Check symbolic directory */
+ tmp_path = realpath(path, NULL);
+ /* Get trimmed path */
+ org_path = g_canonicalize_filename(path, NULL);
+
+#ifdef _USE_TVPD_MODE
+ 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;
+ }
+#else
+ if (g_str_has_prefix(tmp_path, MEDIA_SHARE_PATH)) {
+ /* 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));
+ if (g_strcmp0(replace, 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;
+ }
+ } 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;
+ }