Backport fix for 204322: Giuseppe Della Bianca is completely right, this should be path(), not toLocalFile(). Wrong Windows porting... So, renaming remote files during copy was broken in 4.3.0 too...
Changed paths: