Skip to content

Commit 0faaf16

Browse files
committed
fix(backup): use &str replacement on Windows path normalization
str::replace's second argument must implement Pattern as &str, not char — the Windows-only derive_snapshot_prefix passed '/' and failed to compile on windows-msvc. Linux/macOS never compile this branch so the local build and the Linux release jobs both passed.
1 parent 1c22741 commit 0faaf16

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/vykar-core/src/commands/backup

crates/vykar-core/src/commands/backup/source.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ fn derive_snapshot_prefix(configured: &Path, abs_source: &Path) -> String {
280280
};
281281
// dunce::simplified strips the \\?\ verbatim prefix if present.
282282
let simplified = dunce::simplified(&abs_clean);
283-
let s = simplified.to_string_lossy().replace('\\', '/');
283+
let s = simplified.to_string_lossy().replace('\\', "/");
284284
// Drive letter: "C:/Users/..." → "C/Users/..."
285285
// UNC root: "//server/share/..." → "server/share/..."
286286
let s = s.replacen(':', "", 1);

0 commit comments

Comments
 (0)