Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix windows style file paths in fs cp command (#1118)
## Changes Copying a local file in windows to remote directory in DBFS would fail if the path was specified as a windows style path (compared to a UNIX style path). This PR fixes that. Note, UNIX style paths will continue to work because `filepath.Base` respects both `/` and `\` as file separators. See: `IsPathSeparator` in https://go.dev/src/os/path_windows.go. Fixes issue: #1109. ## Tests Integration test and manually ``` C:\Users\shreyas.goenka>Desktop\cli.exe fs cp .\Desktop\foo.txt dbfs:/Users/[email protected] .\Desktop\foo.txt -> dbfs:/Users/[email protected]/foo.txt C:\Users\shreyas.goenka>Desktop\cli.exe fs cat dbfs:/Users/[email protected]/foo.txt hello, world ````
- Loading branch information