php-sftp icon indicating copy to clipboard operation
php-sftp copied to clipboard

Directory Separator on Windows

Open Santana1053 opened this issue 6 years ago • 1 comments

When executing this from a Windows PHP environment, the DIRECTORY_SEPARATOR constant is defined as \, however with SFTP the directory separator should ALWAYS be /. Otherwise a file that should go in Folder1 > Folder2 > MyFile ends up uploading like "Folder1\Folder2\MyFile" as the entire filename instead of being in the directories.

Santana1053 avatar Oct 31 '18 17:10 Santana1053

To avoid this issue, I think we have to use the / instead.

peter279k avatar May 13 '19 15:05 peter279k