-
Notifications
You must be signed in to change notification settings - Fork 25
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
Use a dedicated type for relative paths #252
Labels
Comments
casey
added a commit
that referenced
this issue
Apr 6, 2020
If a user passes `--input foo`, print "Searching `foo` for files…", instead of the resolved, absolute path to `foo`, since the former is what the user typed in. This was way harder, and had way more edge cases, than I thought it would be! One takaway, lexical path cleaning is excellent. Fixes #332 and #252.
casey
added a commit
that referenced
this issue
Apr 6, 2020
If a user passes `--input foo`, print "Searching `foo` for files…", instead of the resolved, absolute path to `foo`, since the former is what the user typed in. This was way harder, and had way more edge cases, than I thought it would be! One takaway, lexical path cleaning is excellent. Fixes: - #252 - #332
casey
added a commit
that referenced
this issue
Apr 6, 2020
If a user passes `--input foo`, print "Searching `foo` for files…", instead of the resolved, absolute path to `foo`, since the former is what the user typed in. This was way harder, and had way more edge cases, than I thought it would be! One takaway, lexical path cleaning is excellent. Fixes: - #252 - #332
casey
added a commit
that referenced
this issue
Apr 6, 2020
If a user passes `--input foo`, print "Searching `foo` for files…", instead of the resolved, absolute path to `foo`, since the former is what the user typed in. This was way harder, and had way more edge cases, than I thought it would be! One takaway, lexical path cleaning is excellent. Fixes: - #252 - #332
Fixed / given up on in #334. |
casey
added a commit
that referenced
this issue
Apr 8, 2020
If a user passes `--input foo`, print "Searching `foo` for files…", instead of the resolved, absolute path to `foo`, since the former is what the user typed in. This was way harder, and had way more edge cases, than I thought it would be! One takaway, lexical path cleaning is excellent. type: changed fixes: - #252 - #332
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, relative path and paths passed as arguments are just
PathBuf
s. These paths must be passed toEnv::resolve
before being used, in order to ensure that they are interpreted relative to the current directory.I think it might be good to use a dedicated type for these paths, so that we don't accidentally use paths that have not been passed to
Env::resolve
, and so we can try to print out the paths in error messages that users actually input, instead of printing out absolute paths that they might not recognize.Fix the torrent create message, which currently uses absolute path for metainfo path. Should be:
The text was updated successfully, but these errors were encountered: