[SENDMAIL] Fix Send To -> Desktop (create shortcut) behavior (#4913)
authorThamatip Chitpong <tangaming123456@outlook.com>
Sat, 3 Dec 2022 17:06:45 +0000 (00:06 +0700)
committerGitHub <noreply@github.com>
Sat, 3 Dec 2022 17:06:45 +0000 (20:06 +0300)
commit7c2b22c4de31933a30d411bbbc25e7f29fb77e5d
treedaf858f8d756ab6ac2e7aea2fff28bb0b68aa885
parentfeff2b1e6c5e3b2ece225e20d32b98c2bd813617
[SENDMAIL] Fix Send To -> Desktop (create shortcut) behavior (#4913)

Several fixes and improvements to the CDeskLinkDropHandler:
- Set default working directory for shortcuts (except folders and zip files)
- Copy existing shortcut to the desktop if the source file is a shortcut
- Prevent destination file name collision

Verified on Windows XP SP3 and Windows 7 SP1.
dll/shellext/sendmail/CDeskLinkDropHandler.cpp