Fix: handle preview download errors and Unix metadata keys

Consume TOKEN_DOWNLOAD_ERROR in the file manager and fail the matching
preview request with the client's win32 code instead of sending
COMMAND_EXCEPTION and leaving the request to the 15 s watchdog.

Key the exact size/mtime metadata by the list's displayed ANSI/GBK text,
not the raw protocol bytes: Linux/macOS send UTF-8 names while GetItemText
returns the process ACP, so non-ASCII files previously missed the metadata
lookup and could not start a preview.

Bind the Unix progress dialog to the preview request so a stalled transfer
closes it on timeout; save the index after LRU eviction; make the local
right-click Open honour search-result paths; reject over-long received
names; and defer abandoned temp-dir deletion to the watchdog.

The new download-error and hash-error strings are added to en_US, zh_TW
and de_DE.

Co-Authored-By: deepseek-flash
This commit is contained in:
yuanyuanxianganddeepseek-flash committed 2026-12-05 15:44:36 +01:00
1 parent 6cb779ef70
commit bcd7ee692a
6 files changed
+70 -9

No files matched your search

+1
View File
@@ -2371,3 +2371,4 @@ MCP
文件较大,不支持预览:%s(%llu MB,上限 %u MB)=Datei zu gross fuer die Vorschau: %s (%llu MB, Grenze %u MB)
正在预览 %s ...=Vorschau von %s ...
获取远程文件信息失败(错误码 %u)=Dateiinformationen konnten nicht abgerufen werden (Fehler %u)
预览下载失败(错误码 %u)=Vorschau-Download fehlgeschlagen (Fehler %u)
+1
View File
@@ -2382,3 +2382,4 @@ MCP
文件较大,不支持预览:%s(%llu MB,上限 %u MB)=File too large to preview: %s (%llu MB, limit %u MB)
正在预览 %s ...=Previewing %s ...
获取远程文件信息失败(错误码 %u)=Failed to get remote file information (error %u)
预览下载失败(错误码 %u)=Preview download failed (error %u)
+1
View File
@@ -2375,3 +2375,4 @@ MCP
文件较大,不支持预览:%s(%llu MB,上限 %u MB)=檔案過大,不支援預覽:%s(%llu MB,上限 %u MB)
正在预览 %s ...=正在預覽 %s ...
获取远程文件信息失败(错误码 %u)=取得遠端檔案資訊失敗(錯誤碼 %u)
预览下载失败(错误码 %u)=預覽下載失敗(錯誤碼 %u)