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(_) => {
|
Err(_) => {
|
||||||
// The file exists somewhere outside of the package.
|
// The file exists somewhere outside of the package.
|
||||||
let file_name = file_path.file_name().unwrap();
|
let file_name = file_path.file_name().unwrap();
|
||||||
if result
|
if result.iter().any(|ar| ar.rel_path == file_name) {
|
||||||
.iter()
|
|
||||||
.any(|ar| ar.rel_path.file_name().unwrap() == file_name)
|
|
||||||
{
|
|
||||||
ws.config().shell().warn(&format!(
|
ws.config().shell().warn(&format!(
|
||||||
"{} `{}` appears to be a path outside of the package, \
|
"{} `{}` appears to be a path outside of the package, \
|
||||||
but there is already a file named `{}` in the root 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