Move workspace file work off the main thread and delete to the trash
Run the blocking workspace commands on the blocking thread pool. Tauri runs a synchronous command on the main thread, so a long search or copy froze every window. Command names, arguments, and results do not change. Send each workspace-event only to the windows that have its root open. The frontend listens with its window label as the target. Do not send access events, because the frontend ignores them. Drop watchers after the state lock is released, because a macOS watcher waits for its thread when it stops. Fix these defects. Each fix has a Rust test: - A rename that changes only the letter case works on case-insensitive volumes. - New files publish with a move that never replaces a file: MoveFileExW on Windows, renameat2 or renamex_np on Linux and macOS, then a hard link, then create_new. exFAT, FAT32, and many network mounts now work. The Windows save recovery uses the same move. - On macOS and Linux, existing names with a colon stay usable. New names reject the characters that Windows does not allow, on every platform. - workspace_read_data_url checks the size before it reads the file. - workspace_write_bytes uses the atomic writer. Its only caller writes new names, so it gets no conflict check. - Delete and rename act on a link itself, not on its target. Delete now moves items to the system trash. One file moves without a confirmation. A folder or several items need one. Shift+Delete and "Delete permanently" keep the permanent delete with its confirmation. Windows drives without a Recycle Bin give an error instead of a silent permanent delete. The smoke test for tree actions now checks this behavior. The user guide describes it and the new-name rule.
This commit is contained in:
@@ -3466,7 +3466,15 @@ export const messageRows: [string, string, string, string][] = [
|
||||
"{count} éléments supprimés sur {total}",
|
||||
"{total}項目中{count}項目を削除しました",
|
||||
"已删除 {total} 项中的 {count} 项"
|
||||
]
|
||||
],
|
||||
["Delete permanently", "Supprimer définitivement", "完全に削除", "永久删除"],
|
||||
["Delete permanently ({count})", "Supprimer définitivement ({count})", "完全に削除 ({count})", "永久删除 ({count})"],
|
||||
["Move to trash", "Placer dans la corbeille", "ごみ箱に移動", "移到回收站"],
|
||||
["Move {name} and everything inside it to the trash?", "Placer {name} et tout son contenu dans la corbeille ?", "{name}とその中のすべてをごみ箱に移動しますか?", "将 {name} 及其全部内容移到回收站?"],
|
||||
["Move {count} selected items to the trash?", "Placer les {count} éléments sélectionnés dans la corbeille ?", "選択した{count}項目をごみ箱に移動しますか?", "将所选的 {count} 项移到回收站?"],
|
||||
["Move {count} selected items and all contents of selected folders to the trash?", "Placer les {count} éléments et tout le contenu des dossiers sélectionnés dans la corbeille ?", "選択した{count}項目と選択フォルダー内のすべてをごみ箱に移動しますか?", "将所选的 {count} 项及所选文件夹的全部内容移到回收站?"],
|
||||
["Moved {count} of {total} items to the trash. Restore them from the system trash.", "{count} éléments sur {total} placés dans la corbeille. Restaurez-les depuis la corbeille du système.", "{total}項目中{count}項目をごみ箱に移動しました。システムのごみ箱から復元できます。", "已将 {total} 项中的 {count} 项移到回收站。可从系统回收站恢复。"],
|
||||
["To delete permanently instead, select the items and press Shift+Delete.", "Pour supprimer définitivement, sélectionnez les éléments et appuyez sur Maj+Suppr.", "完全に削除するには、項目を選択して Shift+Delete を押してください。", "要永久删除,请选择这些项目并按 Shift+Delete。"]
|
||||
];
|
||||
export const catalogs: Record<Exclude<Locale, 'en'>, Record<string, string>> = {
|
||||
fr: Object.fromEntries(messageRows.map(row => [row[0], row[1]])),
|
||||
|
||||
Reference in New Issue
Block a user