[ACR-1896] Remove ".scan_ignore" exception handling 09/322709/6
authorMinje Ahn <minje.ahn@samsung.com>
Tue, 15 Apr 2025 00:11:30 +0000 (09:11 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Wed, 16 Apr 2025 03:25:21 +0000 (12:25 +0900)
Change-Id: Ia5f10e237f7f06cba9437e5120cce2d89ead7c7a
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
include/media_content.h
include_product/media_content.h
packaging/capi-content-media-content.spec
src/media_util_private.c

index 4dedc909e82e5dd4c8d01380575d867c9cb1fe24..9672689b6efcc839ac2eaa95462dfab615887672 100644 (file)
@@ -129,7 +129,6 @@ int media_content_scan_file(const char *path);
  * @details This function requests to scan a media folder to the media server with given completed callback function.
  *          media_scan_completed_cb() function will be called when the scanning is finished.
  *          The sub folders are also scanned, if there are sub folders in that folder. \n
- *          If any folder must not be scanned, a blank file ".scan_ignore" has to be created in that folder.
  *          After adding or removing a folder from the filesystem, call this function on its source location
  *          (this will add or remove an entry from the database). \n
  *          After moving or renaming a folder in the filesystem, call this function on its source location
@@ -149,7 +148,8 @@ int media_content_scan_file(const char *path);
  *                   If you want to access only internal storage by using this function, you should add privilege %http://tizen.org/privilege/mediastorage. \n
  *                   Or if you want to access only external storage by using this function, you should add privilege %http://tizen.org/privilege/externalstorage. \n
  *                   If you can access both storage, you must add all privilege. \n
- *                   Since 4.0, This function does not allow a symbolic link.
+ *                   Since 4.0, this function does not allow a symbolic link. \n
+ *                   Since 10.0, skipping the specific folder scanning using ".scan_igfile" file is not supported.
  *
  * @param[in] path The folder path
  * @param[in] is_recursive Set @c true to scan recursively subdirectories,
index ae10ab2c03cb9bb75217ef6dc36b5af9be1e015b..0da665884864f7dcdf5823d0bc82702281d00f32 100644 (file)
@@ -130,7 +130,6 @@ int media_content_scan_file(const char *path);
  * @details This function requests to scan a media folder to the media server with given completed callback function.
  *          media_scan_completed_cb() function will be called when the scanning is finished.
  *          The sub folders are also scanned, if there are sub folders in that folder. \n
- *          If any folder must not be scanned, a blank file ".scan_ignore" has to be created in that folder.
  *          After adding or removing a folder from the filesystem, call this function on its source location
  *          (this will add or remove an entry from the database). \n
  *          After moving or renaming a folder in the filesystem, call this function on its source location
@@ -150,7 +149,8 @@ int media_content_scan_file(const char *path);
  *                   If you want to access only internal storage by using this function, you should add privilege %http://tizen.org/privilege/mediastorage. \n
  *                   Or if you want to access only external storage by using this function, you should add privilege %http://tizen.org/privilege/externalstorage. \n
  *                   If you can access both storage, you must add all privilege. \n
- *                   Since 4.0, This function does not allow a symbolic link.
+ *                   Since 4.0, this function does not allow a symbolic link.\n
+ *                   Since 10.0, skipping the specific folder scanning using ".scan_igfile" file is not supported.
  *
  * @param[in] path The folder path
  * @param[in] is_recursive Set @c true to scan recursively subdirectories,
index 152bf274e0d4e5af621887264f8e473ec534ed48..14de1e3782d000d0e22a782b5234938e71a2f33f 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-content-media-content
 Summary:    A Media content library in Tizen Native API
-Version:    0.6.8
+Version:    0.6.9
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index ac46cebdd3d5a9f318187aa93a18e295441056e8..23bef0c26f005278dda1e6742c9b43f204d585d6 100644 (file)
@@ -77,33 +77,12 @@ bool _media_util_is_ignorable_file(const char *path)
        return (!__media_util_is_valid_path(path));
 }
 
-static bool __is_scan_ignore_exist(const char *path)
-{
-       g_autofree gchar *ignore_path = g_build_path(G_DIR_SEPARATOR_S, path, ".scan_ignore", NULL);
-       return (bool)g_file_test(ignore_path, G_FILE_TEST_EXISTS);
-}
-
 bool _media_util_is_ignorable_dir(const char *dir_path)
 {
-       char *leaf_path = NULL;
-       char search_path[MAX_PATH_LEN] = {0, };
-
        content_retv_if(!STRING_VALID(dir_path), true);
        content_retvm_if(strstr(dir_path, "/."), true, "hidden path");
        content_retvm_if(!ms_user_is_valid_path(_content_get_uid(), dir_path), true, "ms_user_is_valid_path failed");
 
-       g_strlcpy(search_path, dir_path, sizeof(search_path));
-
-       while (strlen(search_path) > 0) {
-               content_retvm_if(__is_scan_ignore_exist(search_path), true, "scan ignore file exist");
-
-               leaf_path = strrchr(search_path, '/');
-               if (!leaf_path)
-                       break;
-
-               search_path[leaf_path - search_path] = '\0';
-       }
-
        return false;
 }