Support USB folder update request 44/103944/1 submit/tizen_3.0/20161213.081002
authorMinje Ahn <minje.ahn@samsung.com>
Mon, 12 Dec 2016 01:06:36 +0000 (10:06 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Mon, 12 Dec 2016 01:06:36 +0000 (10:06 +0900)
Change-Id: Ib16103feef3275a1d24cdfca565bd7fdb4411eee
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
packaging/libmedia-service.spec
src/common/media-svc.c

index d5010a8..ac58c9c 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 4347437..a6781d5 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
                }