Skip to content

Commit 4c64041

Browse files
Merge pull request #58 from jcrossley3/main
fix: create extract_dir on same filesystem as out_dir
2 parents 7b8ba24 + 2253a40 commit 4c64041

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

postgresql_archive/src/archive.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,7 @@ pub async fn extract(bytes: &Bytes, out_dir: &Path) -> Result<()> {
349349
return Ok(());
350350
}
351351

352-
let extract_dir = tempfile::tempdir()?.into_path();
353-
create_dir_all(&extract_dir)?;
354-
352+
let extract_dir = tempfile::tempdir_in(parent_dir)?.into_path();
355353
debug!("Extracting archive to {}", extract_dir.to_string_lossy());
356354

357355
for archive_entry in archive.entries()? {

0 commit comments

Comments
 (0)