Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

facilitator: std::path::Path is wrong type for Transport::{get, put} #28

Closed
tgeoghegan opened this issue Sep 28, 2020 · 1 comment
Closed

Comments

@tgeoghegan
Copy link
Collaborator

In #4, @yuriks notes:

I think using Path here is actually not the right call: Path inherently deals with OS-native paths. While that's the natural key for FileTransport, it doesn't really apply for something like S3. If I run this on Windows, for example, I actually still want to keep using / as the separator when I upload to S3, not \. So I think the right way of doing this is to have key be a generic path value (can either just use str with / as the separator, or create your own newtype over it) and then inside FileTransport you can parse it and re-convert to a Path when accessing the filesystem.

tgeoghegan added a commit that referenced this issue Oct 2, 2020
std::path::{Path, PathBuf} are inappropriate for the keys to Transport
methods because S3 object keys are not paths and should always use '/'
as a separator regardless of what platform the code is run on. This
commits replaces their usage with str or String as appropriate.

Addresses #28
tgeoghegan added a commit that referenced this issue Oct 9, 2020
std::path::{Path, PathBuf} are inappropriate for the keys to Transport
methods because S3 object keys are not paths and should always use '/'
as a separator regardless of what platform the code is run on. This
commits replaces their usage with str or String as appropriate.

Addresses #28
tgeoghegan added a commit that referenced this issue Oct 9, 2020
std::path::{Path, PathBuf} are inappropriate for the keys to Transport
methods because S3 object keys are not paths and should always use '/'
as a separator regardless of what platform the code is run on. This
commits replaces their usage with str or String as appropriate.

Addresses #28
@tgeoghegan
Copy link
Collaborator Author

Fixed in #36

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

No branches or pull requests

1 participant