You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A trailing slash on the input to maktaba#path#Split is treated the same way as input without a trailing slasht. The last path component in the returned list of components will have no trailing slash either way:
echomaktaba#path#Split('foo/bar/')
['foo', 'bar']
Maktaba should try to preserve trailing slashes in path manipulations since they help distinguish paths that represent a directory from paths that may represent a file. For instance, Join(Split(X)) loses the trailing slash:
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).
A trailing slash on the input to
maktaba#path#Split
is treated the same way as input without a trailing slasht. The last path component in the returned list of components will have no trailing slash either way:['foo', 'bar']
Maktaba should try to preserve trailing slashes in path manipulations since they help distinguish paths that represent a directory from paths that may represent a file. For instance, Join(Split(X)) loses the trailing slash:
foo/bar
Instead, Split should maintain the slash in the last component:
['foo', 'bar/']
It could instead include the empty string as a final component, but I don't think that's as self-explanatory.
The text was updated successfully, but these errors were encountered: