PyFilesystem / pyfilesystem

Python filesystem abstraction layer
http://pyfilesystem.org/
BSD 3-Clause "New" or "Revised" License
287 stars 63 forks source link

fs.path.join breaks URLs #279

Closed rotu closed 6 years ago

rotu commented 6 years ago

fs.path.join coalesces slashes, which breaks protocol declarations if passed a URL. I'm not sure if it should be URL-aware, but it should probably be consistent with fs.path.combine:

fs.path.join('smb://user:pass@host/svc','path')
'smb:/user:pass@host/svc/path'
# open_fs will treat this as an OS path

fs.path.combine('smb://user:pass@host/svc','path')
'smb://user:pass@host/svc/path'
# open_fs will treat this as a SMB path
rotu commented 6 years ago

accidentally created here instead of pyfilesystem2