Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick Fix for #153 #154

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

andrew-christianson
Copy link

In the spirit of fixing, rather than whinging, this is a quick fix for my issue #153. Splitting paths on : in drake.fs$split-path returns ('C', '\\data\\test.csv') for properly formed windows paths. This causes drake.fs$get-fs to return [fs, 'C', '\\data\\test.csv]. So, a basic function e.g. (fs di/data-in? "C:\\data\\test.csv") goes to (di/data-in? fs '\\data\\test.csv') which clearly breaks for windows.

Splitting on "://" should still get the correct prefixes for e.g. s3://bucket.blah or hdfs://... without mangling the windows paths.

Note: It seems like there may be a different (and possibly cleaner?) solution to this using make-path more liberally, but it wasn't clear to me exactly where to use that, and this worked. Hence, the quick-fix appellation.

@amalloy
Copy link
Contributor

amalloy commented Dec 11, 2014

I don't know about this...URIs don't have to have :// necessarily: consider mailto:[email protected], for example. This might be okay if all URI schemes that drake actually supports do always use ://, but I don't know enough about that to accept this pull request, which would risk breaking other stuff I don't understand.

@andrew-christianson
Copy link
Author

Fair enough, and thanks for the prompt response. If I get the time, I'll look for alternative solutions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants