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

#path#MakeRelative shouldn't strip trailing slash from {path} argument #175

Closed
dbarnett opened this issue Dec 4, 2016 · 1 comment
Closed
Assignees
Labels

Comments

@dbarnett
Copy link
Contributor

dbarnett commented Dec 4, 2016

The output of maktaba#path#MakeRelative doesn't have a trailing slash even if the {path} argument had one:
maktaba#path#MakeRelative('/foo', '/foo/bar/')'bar'

Since trailing slashes are significant in maktaba's path handling, explicitly signifying a directory path instead of a file path, it would be better to preserve any trailing slash from input to output.

@dbarnett dbarnett added the bug label Dec 4, 2016
@dbarnett
Copy link
Contributor Author

Apparently this is just a manifestation of #137 since it's a call to maktaba#path#Split in the MakeRelative implementation that's losing the trailing slash.

dbarnett added a commit that referenced this issue Apr 29, 2017
@dbarnett dbarnett self-assigned this Apr 29, 2017
dbarnett added a commit that referenced this issue Apr 29, 2017
Also improves maktaba#path#MakeRelative to preserve trailing slash and adds a maktaba#path#StripTrailingSlash().

Fixes #137 and #175.
@dbarnett dbarnett closed this as completed May 7, 2017
dbarnett added a commit that referenced this issue May 8, 2017
Changes since 1.14.0:
  * Implement maktaba#buffer#GetVisualSelection helper (#132).
  * Implement maktaba#log#GetFormattedEntries and support 1-arg log
    handler (see #204).
  * Notify user for messages logged at WARN or above by default (#185).
  * Fix Syscall.CallAsync failing for complex commands (#205).
  * Preserve trailing slash in maktaba#path#Split and MakeRelative
    (#137 and #175).
  * Fix 'maxfuncdepth' error in maktaba#json#Parse corner case (#153).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant