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

Add leading slash to remote paths #250

Merged
merged 5 commits into from
Jun 13, 2019
Merged

Conversation

johnbradley
Copy link
Collaborator

@johnbradley johnbradley commented Jun 11, 2019

In support of #243 adds leading slash to remote paths.
This allows users to naturally specify the top level 'directory' of a remote project with '/'.
Previously this leading slash was omitted to match the DukeDS web portal.

Changes the download and deliver commands' arguments include/exclude to allow leading slash or the current functionality of omitting the leading slash. The list command will now print leading slashes.

In support of #243 adds leading slash to remote paths.
This allows users to naturally specify the top level 'directory'
of a project with '/'. Previously this was omitted to match
the DukeDS web portal.

Changes the download command arguments include/exclude to allow
leading slash or the current functionality of omitting the leading
slash.
@johnbradley johnbradley requested a review from dleehr June 11, 2019 18:50
Copy link
Member

@dleehr dleehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that there are many cases where os.sep is used as the path separator character when referring to remote file paths. Recalling that on Windows, os.sep will be '\\', I though this would lead to confusing behavior (e.g. Windows users running ddsclient list -p project would see remote paths delimited by backslashes). But that's not exactly what I'm seeing.

Instead, I'm seeing that the leading slash is now a \ on Windows, but the rest of the path separators are /. I'm not sure why exactly that is, but have added a screenshot:

windows-paths

I think when dealing with remote paths, we should always use an explicit '/', and not the OS'es path separator character.

@johnbradley johnbradley requested a review from dleehr June 12, 2019 17:22
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