Merge same query 83/308183/1 accepted/tizen/unified/20240320.110711 accepted/tizen/unified/20240320.151926 accepted/tizen/unified/x/20240326.073509
authorMinje Ahn <minje.ahn@samsung.com>
Tue, 19 Mar 2024 06:46:33 +0000 (15:46 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Tue, 19 Mar 2024 06:46:33 +0000 (15:46 +0900)
Change-Id: Idd0b6fafe2f42c7a248b719d6bcb9f10cc578a19
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
src/common/media-common-db-svc.c

index 134ba88..17de0bd 100644 (file)
@@ -438,15 +438,10 @@ int ms_delete_invalid_folder(const char *storage_id, uid_t uid)
        int ret = MS_MEDIA_ERR_NONE;
        char *sql = NULL;
 
-#ifdef _USE_TVPD_MODE
        MS_DBG_RETVM_IF(!MS_STRING_VALID(storage_id), MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
 
-       sql = sqlite3_mprintf("DELETE FROM folder WHERE storage_uuid='%q' AND validity IN (%d, %d)", storage_id, MS_INVALID, MS_SCANNING);
-#else
        sql = sqlite3_mprintf("DELETE FROM folder WHERE validity IN (%d, %d) AND storage_uuid=%Q", MS_INVALID, MS_SCANNING, storage_id);
-#endif
        ret = media_db_update_db_direct(sql, uid);
-
        MS_SQL_SAFE_FREE(sql);
 
        return ret;