refactor: convert synchronous file operations to asynchronous for improved performance (#5059)
* refactor: convert synchronous file operations to asynchronous for improved performance * fix: update copy_icon_file to use asynchronous directory creation * refactor: remove unnecessary variable assignments in shortcut management functions
This commit is contained in:
@@ -4,8 +4,8 @@ use feat::LocalBackupFile;
|
||||
|
||||
/// Create a local backup
|
||||
#[tauri::command]
|
||||
pub fn create_local_backup() -> CmdResult<()> {
|
||||
wrap_err!(feat::create_local_backup())
|
||||
pub async fn create_local_backup() -> CmdResult<()> {
|
||||
wrap_err!(feat::create_local_backup().await)
|
||||
}
|
||||
|
||||
/// List local backups
|
||||
@@ -16,8 +16,8 @@ pub fn list_local_backup() -> CmdResult<Vec<LocalBackupFile>> {
|
||||
|
||||
/// Delete local backup
|
||||
#[tauri::command]
|
||||
pub fn delete_local_backup(filename: String) -> CmdResult<()> {
|
||||
wrap_err!(feat::delete_local_backup(filename))
|
||||
pub async fn delete_local_backup(filename: String) -> CmdResult<()> {
|
||||
wrap_err!(feat::delete_local_backup(filename).await)
|
||||
}
|
||||
|
||||
/// Restore local backup
|
||||
|
||||
Reference in New Issue
Block a user