mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-10 19:00:53 +08:00
clipboard: notify the audit at the first file of a list, not the last
wf_cliprdr_add_to_file_arrays() assigned first_file_index for every regular file, so it ended up holding the last one, and HandleClipboardFiles fired when the paste reached the last file rather than when it started. A paste cancelled before its last file sent no audit record. The Unix owner in serv_files.rs already takes the first regular file. Keep the first assignment only. clear_file_array() resets the index to (size_t)-1 before every list is built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq
This commit is contained in:
1 parent
4cf13985bd
commit
62011f5a84
1 file changed
+2
-1
@@ -2561,7 +2561,8 @@ static BOOL wf_cliprdr_add_to_file_arrays(wfClipboard *clipboard, WCHAR *full_fi
|
||||
}
|
||||
|
||||
if ((clipboard->fileDescriptor[clipboard->nFiles]->dwFileAttributes &
|
||||
FILE_ATTRIBUTE_DIRECTORY) == 0) {
|
||||
FILE_ATTRIBUTE_DIRECTORY) == 0 &&
|
||||
clipboard->first_file_index == (size_t)-1) {
|
||||
clipboard->first_file_index = clipboard->nFiles;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user