diff --git a/man/path-convert.1 b/man/path-convert.1 index 8bf0796..02f5644 100644 --- a/man/path-convert.1 +++ b/man/path-convert.1 @@ -11,7 +11,11 @@ .Sh DESCRIPTION The .Nm -utility converts UNIX paths to DOS, for command substituting paths when invoking Windows executables from the terminal in WSL. Its options are as follows: +utility converts UNIX paths to DOS, for command substituting paths when invoking Windows executables from the terminal in WSL. +.Pp +Arguments that fail to canonicalize will be passed through as-is. +.Pp +Its options are as follows: .Bl -tag -width Ds .It Fl h , Fl -help Displays a short help text. diff --git a/path-convert/Cargo.toml b/path-convert/Cargo.toml index 534da82..0370ddc 100644 --- a/path-convert/Cargo.toml +++ b/path-convert/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "path-convert" -version = "0.0.6" +version = "0.0.7" edition = "2021" [dependencies] diff --git a/path-convert/src/main.rs b/path-convert/src/main.rs index c486774..0fe2557 100644 --- a/path-convert/src/main.rs +++ b/path-convert/src/main.rs @@ -42,11 +42,12 @@ pub fn main() { // canonicalize; windows doesn't recognize symlinks let path = Path::new(&target).canonicalize(); - let mut output = + let mut output: String = if let Ok(canonical) = path { canonical.to_string_lossy().to_string() } else { - target + println!("{quotes}{target}{quotes}"); + continue; }; // handle no-space flag