Support USB folder update request 62/103962/1 accepted/tizen/common/20161214.160253 accepted/tizen/ivi/20161214.015236 accepted/tizen/mobile/20161214.014608 accepted/tizen/tv/20161214.015003 accepted/tizen/wearable/20161214.015213 submit/tizen/20161213.083228
authorMinje Ahn <minje.ahn@samsung.com>
Mon, 12 Dec 2016 01:06:36 +0000 (10:06 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Mon, 12 Dec 2016 02:32:25 +0000 (18:32 -0800)
Change-Id: Ib16103feef3275a1d24cdfca565bd7fdb4411eee
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
(cherry picked from commit 0a96a088a82348999fb65a81d2f0fa866c982572)

packaging/libmedia-service.spec
src/common/media-svc.c

index d5010a8d517662f8cb844d3667abd5ff977e0d59..ac58c9c00280ae5657c7f0ea9e9d84c31b1b7be4 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmedia-service
 Summary:    Media information service library for multimedia applications
-Version: 0.2.86
+Version: 0.2.87
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0 and public domain
index 434743715a56b0432f0ac5d7bc1f1dc3332f2347..a6781d592f0c9c17c47990398fe30f6c0d520daf 100755 (executable)
@@ -1027,7 +1027,7 @@ int media_svc_rename_folder(MediaSvcHandle *handle, const char *storage_id, cons
 
        snprintf(dst_child_path, sizeof(dst_child_path), "%s/%%", dst_path);
 
-       select_all_sql = sqlite3_mprintf("SELECT media_uuid, path, thumbnail_path, media_type from media where folder_uuid IN ( SELECT folder_uuid FROM folder where path='%q' or path like '%q');", dst_path, dst_child_path);
+       select_all_sql = sqlite3_mprintf("SELECT media_uuid, path, thumbnail_path, media_type from '%q' where folder_uuid IN ( SELECT folder_uuid FROM folder where path='%q' or path like '%q');", storage_id, dst_path, dst_child_path);
 
        media_svc_debug("[SQL query] : %s", select_all_sql);
 
@@ -1119,15 +1119,15 @@ int media_svc_rename_folder(MediaSvcHandle *handle, const char *storage_id, cons
                char *update_item_sql = NULL;
 
                if (no_thumb) {
-                       update_item_sql = sqlite3_mprintf("UPDATE media SET path='%q' WHERE media_uuid='%q'", replaced_path, media_uuid);
+                       update_item_sql = sqlite3_mprintf("UPDATE '%q' SET path='%q' WHERE media_uuid='%q'", storage_id, replaced_path, media_uuid);
                } else {
 #if 0
                        if (media_type == MEDIA_SVC_MEDIA_TYPE_IMAGE || media_type == MEDIA_SVC_MEDIA_TYPE_VIDEO)
-                               update_item_sql = sqlite3_mprintf("UPDATE media SET path='%q', thumbnail_path='%q' WHERE media_uuid='%q'", replaced_path, media_new_thumb_path, media_uuid);
+                               update_item_sql = sqlite3_mprintf("UPDATE '%q' SET path='%q', thumbnail_path='%q' WHERE media_uuid='%q'", storage_id, replaced_path, media_new_thumb_path, media_uuid);
                        else
-                               update_item_sql = sqlite3_mprintf("UPDATE media SET path='%q', thumbnail_path='%q' WHERE media_uuid='%q'", replaced_path, media_thumb_path, media_uuid);
+                               update_item_sql = sqlite3_mprintf("UPDATE '%q' SET path='%q', thumbnail_path='%q' WHERE media_uuid='%q'", storage_id, replaced_path, media_thumb_path, media_uuid);
 #else
-                       update_item_sql = sqlite3_mprintf("UPDATE media SET path='%q', thumbnail_path='%q' WHERE media_uuid='%q'", replaced_path, media_new_thumb_path, media_uuid);
+                       update_item_sql = sqlite3_mprintf("UPDATE '%q' SET path='%q', thumbnail_path='%q' WHERE media_uuid='%q'", storage_id, replaced_path, media_new_thumb_path, media_uuid);
 #endif
                }