if (ms_set_storage_scan_status(handle, uuid, MEDIA_SCAN_PREPARE, uid) != MS_MEDIA_ERR_NONE) {
MS_DBG_ERR("ms_set_storage_scan_status failed");
}
+
+ MS_DBG_ERR("init storage data in DB");
+ /* update storage_id table set validity=0 first */
+ ms_validaty_change_all_items(handle, mount_uuid, MS_STORAGE_EXTERNAL, false, uid);
+ /*update folder table set validity = 0*/
+ ms_set_folder_validity(handle, mount_uuid, storage_path, MS_INVALID, TRUE, uid);
+ /* update folder table set scan_status=0 first */
+ ms_set_folder_scan_status(handle, mount_uuid, NULL, MS_DIR_SCAN_NONE, uid);
+ MS_DBG_ERR("init storage data in DB end");
} else {
/* there is no information of this storage in Media DB */
ret = ms_insert_storage(handle, mount_uuid, NULL, mount_path, uid);