lionel_debroux@yahoo.fr writes:
@@ -1179,6 +1181,15 @@ static HRESULT copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST const FILE_ENTRY *entryToCopy; const FILE_ENTRY *fileDest = &flTo->feFiles[0];
- /* If the destination is empty, SHFileOperation should use the current directory */
- if (!fileDest)
- {
WCHAR currd[MAX_PATH];GetCurrentDirectoryW(MAX_PATH, currd);parse_file_list(flTo, currd);fileDest = &flTo->feFiles[0];- }
This can't possibly work. parse_file_list requires a null-terminated list, and you will be overwriting the previous data. This needs more thought.