Skip to content

Commit 8f3bc5a

Browse files
committed
debug mode for windows (#301)
1 parent 0bc9489 commit 8f3bc5a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

git-worktree/src/os.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ pub fn remove_symlink(path: &Path) -> io::Result<()> {
1414

1515
#[cfg(windows)]
1616
pub fn remove_symlink(path: &Path) -> io::Result<()> {
17-
let meta = std::fs::metadata(path)?;
18-
if meta.is_dir() {
19-
std::fs::remove_dir(path)
20-
} else {
21-
std::fs::remove_file(path)
22-
}
17+
dbg!(path, std::fs::symlink_metadata(path), std::fs::metadata(path));
18+
symlink::remove_symlink_auto(path)
2319
}
2420

2521
#[cfg(windows)]

0 commit comments

Comments
 (0)