diff --git a/src-tauri/src/music/commands.rs b/src-tauri/src/music/commands.rs index a72e336..2ccf23e 100644 --- a/src-tauri/src/music/commands.rs +++ b/src-tauri/src/music/commands.rs @@ -116,10 +116,10 @@ pub fn get_position(state: State<'_, AppData>) -> std::time::Duration { #[tauri::command] pub fn add_folder(app: AppHandle, path: &str) -> Result<(), String> { - let pear = saved_directories::ActiveModel { + saved_directories::ActiveModel { path: Set(path.to_owned()), ..Default::default() // all other attributes are `NotSet` }; - app.emit("FOLDER_ADDED_EVENT", "").unwrap(); + app.emit("FOLDER_ADDED_EVENT", path.to_string()).unwrap(); Ok(()) } \ No newline at end of file