mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-06-25 17:54:55 +03:00
* fix(clipboard): unix, refresh cached file size/mtime on re-copy sync_files() deduped re-copies by path string only, so editing a file and re-copying it (same path) skipped refreshing the cached size/mtime and the file-group descriptor; the peer then received the file truncated to the old cached size (silent corruption for PDF/zip/pptx). Widen the early-return guard to also compare a top-level (size, mtime) fingerprint and to always rebuild when a directory is selected. The Windows wf_cliprdr.c path re-stats per request and is unaffected. Signed-off-by: RAIT-09 <51452399+RAIT-09@users.noreply.github.com> * opt(clipboard): unix, compute file fingerprint once and pass into sync_files fingerprint() was computed before taking the CLIP_FILES lock and then recomputed inside ClipFiles::sync_files under the lock. Pass the precomputed value in so the top-level stat runs once and outside the critical section. No behavior change. Signed-off-by: RAIT-09 <51452399+RAIT-09@users.noreply.github.com> --------- Signed-off-by: RAIT-09 <51452399+RAIT-09@users.noreply.github.com>