Skip to content

Commit f7e1735

Browse files
committed
cargo-vendor: path normalize for backslashes
1 parent 378e292 commit f7e1735

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cargo/ops/vendor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct VendorConfig {
6060
#[serde(rename_all = "lowercase", untagged)]
6161
enum VendorSource {
6262
Directory {
63-
directory: PathBuf,
63+
directory: String,
6464
},
6565
Registry {
6666
registry: Option<String>,
@@ -298,7 +298,7 @@ fn sync(
298298
config.insert(
299299
merged_source_name.to_string(),
300300
VendorSource::Directory {
301-
directory: opts.destination.to_path_buf(),
301+
directory: opts.destination.to_string_lossy().replace("\\", "/"),
302302
},
303303
);
304304
} else if !dest_dir_already_exists {

0 commit comments

Comments
 (0)