From 75231fd5827a652136e5fb996f10e180caf8bdee Mon Sep 17 00:00:00 2001 From: James Farrell Date: Wed, 22 Jan 2025 20:02:52 +0000 Subject: [PATCH] Handle symlinks to license files in subdirectory Test: ./crate_tool import crc-catalog 2.4.0 Bug: 391657889 Change-Id: I40d4c9ebb001d4574beb81a5750fa8f8f61eb579 --- tools/external_crates/crate_tool/src/managed_repo.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/external_crates/crate_tool/src/managed_repo.rs b/tools/external_crates/crate_tool/src/managed_repo.rs index 23b0410f53..e672ef7a4e 100644 --- a/tools/external_crates/crate_tool/src/managed_repo.rs +++ b/tools/external_crates/crate_tool/src/managed_repo.rs @@ -578,10 +578,7 @@ impl ManagedRepo { if licenses.satisfied.len() == 1 && licenses.unsatisfied.is_empty() { let license_file = krate.path().join("LICENSE")?; if !license_file.abs().exists() { - symlink( - licenses.satisfied.iter().next().unwrap().1.file_name().unwrap(), - license_file, - )?; + symlink(licenses.satisfied.iter().next().unwrap().1, license_file)?; } }