mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Check that library is file
This commit is contained in:
parent
40b7e0e525
commit
a1ea1c128d
@ -707,6 +707,12 @@ impl<'a> CrateLocator<'a> {
|
||||
loc.original().clone(),
|
||||
));
|
||||
}
|
||||
if !loc.original().is_file() {
|
||||
return Err(CrateError::ExternLocationNotFile(
|
||||
self.crate_name,
|
||||
loc.original().clone(),
|
||||
));
|
||||
}
|
||||
let Some(file) = loc.original().file_name().and_then(|s| s.to_str()) else {
|
||||
return Err(CrateError::ExternLocationNotFile(
|
||||
self.crate_name,
|
||||
|
Loading…
Reference in New Issue
Block a user