PyFilesystem / pyfilesystem

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

OSFS.unsyspath on paths 6 chars long #219

Closed potrebic closed 9 years ago

potrebic commented 9 years ago

OSFS.unsyspath seems to special case paths that are 6 chars long (some Windows thing?), But that logic seems to mess up paths on Macs. For example:

from fs.OSFS import OSFS fs = OSFS('/') fs.unsyspath(fs.getsyspath('abcde')) u'abcde\'

The original 'abcde' was corrupted to 'abcde\'

willmcgugan commented 9 years ago

I think I can fix that by checking for the platform.

willmcgugan commented 9 years ago

pushed a quick fix