diff options
Diffstat (limited to 'pkgs/by-name/ro/rollup/src')
| -rw-r--r-- | pkgs/by-name/ro/rollup/src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/by-name/ro/rollup/src/main.rs b/pkgs/by-name/ro/rollup/src/main.rs index bc628898..3b542f6c 100644 --- a/pkgs/by-name/ro/rollup/src/main.rs +++ b/pkgs/by-name/ro/rollup/src/main.rs @@ -291,7 +291,7 @@ fn apply_patches( for file_diff in &patch.files { match file_diff { FileDiff::Add { path, .. } => { - if applies_to.join(path).exists() { + if applies_to.join(path).try_exists()? { bail!("A file was added, that already existed. This should be impossible.") } if drop_in_applies(&config.drop_ins, owner, &root, path)? { @@ -299,7 +299,7 @@ fn apply_patches( } } FileDiff::Remove { path, .. } => { - if applies_to.join(path).exists() { + if applies_to.join(path).try_exists()? { if drop_in_applies(&config.drop_ins, owner, &root, path)? { final_diffs.push(file_diff.to_owned()); } @@ -312,8 +312,8 @@ fn apply_patches( } FileDiff::RenameNoChange { from, to, .. } | FileDiff::RenameWithChange { from, to, .. } => { - if applies_to.join(from).exists() { - if applies_to.join(to).exists() { + if applies_to.join(from).try_exists()? { + if applies_to.join(to).try_exists()? { bail!( "A rename (`{}` -> `{}`) tried to rename a path to an already existing path. This should be impossible.", from.display(), @@ -332,7 +332,7 @@ fn apply_patches( } } FileDiff::Change { path, .. } => { - if applies_to.join(path).exists() { + if applies_to.join(path).try_exists()? { if drop_in_applies(&config.drop_ins, owner, &root, path)? { final_diffs.push(file_diff.to_owned()); } |
