malloc_trim(0);
if (extract_data->result) {
- /*send notification*/
- char *folder_uuid = NULL;
- ms_get_folder_id(handle, storage_id, extract_data->msg, &folder_uuid);
- ms_send_dir_update_noti(handle, storage_id, update_path, folder_uuid, noti_type, extract_data->pid);
+ if (noti_type == MS_ITEM_INSERT || noti_type == MS_ITEM_UPDATE) {
+ /*send notification*/
+ char *folder_uuid = NULL;
+ ms_get_folder_id(handle, storage_id, extract_data->msg, &folder_uuid);
+ MS_DBG_WARN("storage_id = [%s], dir Path = [%s], folder_uuid = [%s], noti_type = [%d]", storage_id, update_path, folder_uuid, noti_type);
+ ms_send_dir_update_noti(handle, storage_id, update_path, folder_uuid, noti_type, extract_data->pid);
+ }
extract_data->msg_type = MS_MSG_EXTRACTOR_COMPLETE;
msc_send_result(ret, extract_data);
}
MS_DBG_ERR("insert folder failed");
MS_DBG_WARN("ms_insert_folder insert path[%s]", new_start_path);
+ } else {
+ if (ms_set_folder_validity(handle, storage_id, new_start_path, MS_INVALID, is_recursive, uid) != MS_MEDIA_ERR_NONE)
+ MS_DBG_ERR("set_folder_validity failed [%d] ", scan_type);
}
/*start db update. the number of element in the array , db update is complete.*/
}*/
SCAN_DONE:
- MS_DBG_WARN("storage_id = [%s], dir Path = [%s], pid = [%d]", storage_id, scan_data->msg, scan_data->pid);
if (ret != MS_MEDIA_ERR_SCANNER_FORCE_STOP) {
+ if (noti_type == MS_ITEM_DELETE) {
+ MS_DBG_WARN("storage_id = [%s], dir Path = [%s], folder_uuid = [%s], noti_type = [%d]", storage_id, scan_data->msg, folder_uuid, noti_type);
+ ms_send_dir_update_noti(handle, storage_id, scan_data->msg, folder_uuid, noti_type, scan_data->pid);
+ }
msc_insert_exactor_request(scan_data->msg_type, TRUE, scan_data->storage_id, scan_data->msg, scan_data->pid, uid, noti_type);
}
if (power_off2) {