Bug 2082: Workaround for calls to system API failing when used first time against some network shares (Samba) with paths over the legacy Windows limit
https://winscp.net/tracker/2082
(cherry picked from commit 7fca46e47d11a38ef5d5ca74e9752b751f839177)
Source commit: 4eeec091eaf87e5f36189be6f1d85fb61d90c118