mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 22:30:03 +00:00
Fix crate normalize-path
(#508)
* Impl new function `NormalizePath::is_normalized` * Always normalize and ret `PathBuf` in `NormalizePath::normalize` Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
25a4ceb050
commit
c48bc2a264
2 changed files with 27 additions and 25 deletions
|
@ -113,11 +113,11 @@ impl BinFile {
|
|||
|
||||
if !is_valid_path(&path_normalized) {
|
||||
return Err(BinstallError::InvalidSourceFilePath {
|
||||
path: path_normalized.into_owned(),
|
||||
path: path_normalized,
|
||||
});
|
||||
}
|
||||
|
||||
data.bin_path.join(path_normalized.as_ref())
|
||||
data.bin_path.join(&path_normalized)
|
||||
};
|
||||
|
||||
// Destination at install dir + base-name{.extension}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue