crate: fix undefined variable error caused by recent commit

This commit is contained in:
Fabio Valentini 2023-05-17 20:43:48 +02:00
parent bfe8c92989
commit 294741a2b1
No known key found for this signature in database
GPG key ID: 5AC5F572E5D410AF

View file

@ -210,7 +210,7 @@ def process_project(
crate_file_path, version = download_crate(project, version) crate_file_path, version = download_crate(project, version)
if store_crate: if store_crate:
copy_target = os.path.join(os.getcwd(), f"{package.name}-{package.version}.crate") copy_target = os.path.join(os.getcwd(), os.path.basename(crate_file_path))
if not (os.path.exists(copy_target) and os.path.samefile(crate_file_path, copy_target)): if not (os.path.exists(copy_target) and os.path.samefile(crate_file_path, copy_target)):
shutil.copy2(crate_file_path, copy_target) shutil.copy2(crate_file_path, copy_target)