Fix update meta(start path issue when language changing) 34/79134/1 accepted/tizen/ivi/20160709.015033 accepted/tizen/mobile/20160709.015023 accepted/tizen/tv/20160709.015035 accepted/tizen/wearable/20160709.015025 submit/tizen/20160708.094845
authorMinje Ahn <minje.ahn@samsung.com>
Fri, 8 Jul 2016 09:40:19 +0000 (18:40 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Fri, 8 Jul 2016 09:40:19 +0000 (18:40 +0900)
Change-Id: I5e660b31ad7ca2911d64626ba19785d7e85fe501
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
packaging/media-server.spec
src/scanner/media-scanner-scan.c

index 5564ee6..c765bda 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       media-server
 Summary:    A server for media content management
-Version:    0.2.96
+Version:    0.2.97
 Release:    0
 Group:      Multimedia/Service
 License:    Apache-2.0
index 47ddcce..ef37eb4 100755 (executable)
@@ -1698,10 +1698,10 @@ gboolean msc_metadata_update(void *data)
 
        start_path = strdup(usr_path);
        ret = __msc_dir_scan_meta_update(handle, start_path, INTERNAL_STORAGE_ID, storage_type, scan_data->uid);
-       MS_SAFE_FREE(usr_path);
 
        /* send notification */
-       ms_send_dir_update_noti(handle, INTERNAL_STORAGE_ID, start_path, NULL, MS_ITEM_UPDATE, scan_data->pid);
+       ms_send_dir_update_noti(handle, INTERNAL_STORAGE_ID, usr_path, NULL, MS_ITEM_UPDATE, scan_data->pid);
+       MS_SAFE_FREE(usr_path);
 
        /*__msc_dir_scan_meta_update For Each External Storage*/
        ret = ms_get_storage_list(handle, &storage_list);
@@ -1723,7 +1723,11 @@ gboolean msc_metadata_update(void *data)
                        continue;
                }
 
-               ret = __msc_dir_scan_meta_update(handle, stg_info->stg_path, stg_info->storage_id, storage_type, scan_data->uid);
+               MS_SAFE_FREE(start_path);
+               if (MS_STRING_VALID(stg_info->stg_path))
+                       start_path = strndup(stg_info->stg_path, strlen(stg_info->stg_path));
+
+               ret = __msc_dir_scan_meta_update(handle, start_path, stg_info->storage_id, storage_type, scan_data->uid);
                /* send notification */
                ms_send_dir_update_noti(handle, stg_info->storage_id, stg_info->stg_path, NULL, MS_ITEM_UPDATE, scan_data->pid);