mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Fix check_for_file_and_add
's check for conflict file
Signed-off-by: Eval EXEC <execvy@gmail.com>
This commit is contained in:
parent
f7d0c8bf94
commit
1dde1e16ee
@ -332,10 +332,7 @@ fn check_for_file_and_add(
|
||||
Err(_) => {
|
||||
// The file exists somewhere outside of the package.
|
||||
let file_name = file_path.file_name().unwrap();
|
||||
if result
|
||||
.iter()
|
||||
.any(|ar| ar.rel_path.file_name().unwrap() == file_name)
|
||||
{
|
||||
if result.iter().any(|ar| ar.rel_path == file_name) {
|
||||
ws.config().shell().warn(&format!(
|
||||
"{} `{}` appears to be a path outside of the package, \
|
||||
but there is already a file named `{}` in the root of the package. \
|
||||
|
Loading…
x
Reference in New Issue
Block a user