mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Schwartzmeyer <and...@schwartzmeyer.com>
Subject Re: Review Request 60622: Add new stout functions for path normalizaiton and URI conversion.
Date Sun, 08 Oct 2017 03:56:34 GMT


> On Oct. 7, 2017, 8:27 p.m., Andrew Schwartzmeyer wrote:
> > I didn't see _why_ we needed to add `path::normalize` and then only use it in `path::join`
(and then only on the result, not on the inputs).
> > 
> > The URI logic is the only logic that needs to worry about normalizing paths currently,
simply because of the sepcification of a URI.

If I had to guess... we're not converting back to backslashes when stripping the `file://`
from URIs, and so this and #60625 are attempt to "catch all" paths that came from URIs.

I think we would be less likely to miss edge cases (and have simpler logic) if we normalizerd
`/ -> \` when removing `file://` from URIs (which should be pretty easy to find...).

Then we can remove these catch-alls.


- Andrew


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60622/#review187347
-----------------------------------------------------------


On Oct. 5, 2017, 9:03 p.m., Jeff Coffler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60622/
> -----------------------------------------------------------
> 
> (Updated Oct. 5, 2017, 9:03 p.m.)
> 
> 
> Review request for mesos, Andrew Schwartzmeyer, John Kordich, Joseph Wu, and Li Li.
> 
> 
> Bugs: MESOS-6705
>     https://issues.apache.org/jira/browse/MESOS-6705
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add new stout function: path::normalize (normalize a filename).
> Add new stout function: uri::uriFromFilename (generate URI from
>   filename).
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/Makefile.am 4386017acd6ca465be3f735460c11d50b440ccc5 
>   3rdparty/stout/include/Makefile.am bdd3e9908ebfc682458a3babc34cbee36ad3f751 
>   3rdparty/stout/include/stout/path.hpp 6ee3a44cd6a878fe383aa68df40b82857b93d0b4 
>   3rdparty/stout/include/stout/uri.hpp PRE-CREATION 
>   3rdparty/stout/tests/CMakeLists.txt 6e5773f1e03671de7ac007caf49edd0f1cd7aedd 
>   3rdparty/stout/tests/path_tests.cpp f8c14d5aefe0b49adb778da784143a328c96183d 
>   3rdparty/stout/tests/uri_tests.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/60622/diff/2/
> 
> 
> Testing
> -------
> 
> See upstream
> 
> 
> Thanks,
> 
> Jeff Coffler
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message