Skip to content

Commit

Permalink
don't delete symlinks with absolute paths on prune
Browse files Browse the repository at this point in the history
  • Loading branch information
cyr committed Nov 23, 2024
1 parent 1b3c779 commit e3ea1e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prune/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fn should_delete(valid_files: &HashMap<FilePath, Option<u64>>, entry: &walkdir::
let real_path = std::fs::read_link(entry.path())?;

if real_path.starts_with("/") {
if real_path.exists() {
if !real_path.exists() {
return Ok(true)
}
} else {
Expand Down

0 comments on commit e3ea1e3

Please sign in to comment.