Skip to content

Commit 3048533

Browse files
authored
duckdb: fix extract path with multiple versions (#8926)
If you had had a branch with version x.y.z and then you rebased and version updated to x.y.z+1 or similar, extract code would use the old folder and fail the build with "duckdb.h not found". Signed-off-by: Mikhail Kot <[email protected]>
1 parent 46b0b2b commit 3048533

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎vortex-duckdb/build.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,12 +642,12 @@ fn main() {
642642
DuckDBVersion::Commit(c) => format!("{DUCKDB_SOURCE_COMMIT_URL}/{c}.zip"),
643643
};
644644

645-
let source_archive_path = source_dir.with_extension("zip");
645+
let source_archive_path = out_dir.join(format!("duckdb-source-{version}.zip"));
646646
download_url(&source_archive_url, &source_archive_path);
647647

648648
let inner_dir = source_dir.join(version.archive_inner_dir_name());
649649
let extract_marker = source_dir.join(".vx-extract-complete");
650-
if !extract_marker.exists() {
650+
if !extract_marker.exists() || !inner_dir.exists() {
651651
if let Err(err) = fs::remove_dir_all(&source_dir)
652652
&& err.kind() != io::ErrorKind::NotFound
653653
{

0 commit comments

Comments
 (0)