Feature: localize the preview messages and report the cached hash
Add the preview strings to en_US, zh_TW and de_DE (GBK, no '=' in keys; German uses ASCII transliterations where GBK cannot encode umlauts), and pass the cached entry's SHA-256 back to the open helper so the executable confirmation shows the actual hash on a cache hit. Honour PreviewEnabled=0 by leaving double-click unchanged, and document the preview plus COMMAND_FILE_HASH capability in the client matrix. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
4d37d85bac
commit
3683b4ebeb
7 files changed
+72
-10
No files matched your search
@@ -1330,14 +1330,14 @@ void CFileManagerDlg::BeginRemotePreview(const CString& fullPath)
|
||||
std::string basename = (pos == std::string::npos) ? remotePath : remotePath.substr(pos + 1);
|
||||
std::string clientKey = GetPreviewClientKey(clientID);
|
||||
|
||||
std::string outPath, error;
|
||||
std::string outPath, error, cachedSha;
|
||||
CFilePreviewMgr::PrepareResult pr = CFilePreviewMgr::Instance().Prepare(
|
||||
clientID, clientKey, remotePath, basename, meta.size, meta.mtimeMs,
|
||||
std::string(), m_hWnd, outPath, error);
|
||||
std::string(), m_hWnd, outPath, error, &cachedSha);
|
||||
Mprintf("[Preview] prepare result=%d out=%s err=%s\n", (int)pr, outPath.c_str(), error.c_str());
|
||||
|
||||
if (pr == CFilePreviewMgr::PrepareCached) {
|
||||
CFilePreviewMgr::OpenLocalFile(m_hWnd, outPath, remotePath, meta.size, std::string());
|
||||
CFilePreviewMgr::OpenLocalFile(m_hWnd, outPath, remotePath, meta.size, cachedSha);
|
||||
return;
|
||||
}
|
||||
if (pr != CFilePreviewMgr::PrepareTransfer) {
|
||||
|
||||
Reference in new issue
Block a user