diff --git a/crates/puffin-distribution/src/distribution_database.rs b/crates/puffin-distribution/src/distribution_database.rs index 696a27a38..59fe29c5f 100644 --- a/crates/puffin-distribution/src/distribution_database.rs +++ b/crates/puffin-distribution/src/distribution_database.rs @@ -159,7 +159,7 @@ impl<'a, Context: BuildContext + Send + Sync> DistributionDatabase<'a, Context> ); fs::create_dir_all(&cache_entry.dir()).await?; let target = cache_entry.into_path_buf(); - tokio::fs::rename(temp_target, &target).await?; + fs_err::tokio::rename(temp_target, &target).await?; Ok(LocalWheel::Unzipped(UnzippedWheel { dist: dist.clone(), @@ -184,7 +184,7 @@ impl<'a, Context: BuildContext + Send + Sync> DistributionDatabase<'a, Context> ); fs::create_dir_all(&cache_entry.dir()).await?; let target = cache_entry.into_path_buf(); - tokio::fs::rename(temp_target, &target).await?; + fs_err::tokio::rename(temp_target, &target).await?; let local_wheel = LocalWheel::Unzipped(UnzippedWheel { dist: dist.clone(), diff --git a/crates/puffin-distribution/src/source/mod.rs b/crates/puffin-distribution/src/source/mod.rs index 7363488db..4ba7b4c1a 100644 --- a/crates/puffin-distribution/src/source/mod.rs +++ b/crates/puffin-distribution/src/source/mod.rs @@ -834,7 +834,7 @@ impl<'a, T: BuildContext> SourceDistCachedBuilder<'a, T> { // Download the source distribution to a temporary file. let sdist_file = temp_dir.path().join(source_dist_filename); let mut writer = tokio::io::BufWriter::new( - tokio::fs::File::create(&sdist_file) + fs_err::tokio::File::create(&sdist_file) .await .map_err(puffin_client::Error::CacheWrite)?, ); diff --git a/crates/puffin-extract/Cargo.toml b/crates/puffin-extract/Cargo.toml index 86eb5a110..2c6af1137 100644 --- a/crates/puffin-extract/Cargo.toml +++ b/crates/puffin-extract/Cargo.toml @@ -16,9 +16,9 @@ workspace = true tokio-util = { workspace = true, features = ["compat"] } async_zip = { workspace = true, features = ["tokio"] } flate2 = { workspace = true } -fs-err = { workspace = true } +fs-err = { workspace = true, features = ["tokio"] } rayon = { workspace = true } tar = { workspace = true } thiserror = { workspace = true } -tokio = { workspace = true } +tokio = { workspace = true, features = ["io-util"] } zip = { workspace = true } diff --git a/crates/puffin-extract/src/lib.rs b/crates/puffin-extract/src/lib.rs index 4a40b5b69..1a569b909 100644 --- a/crates/puffin-extract/src/lib.rs +++ b/crates/puffin-extract/src/lib.rs @@ -44,12 +44,12 @@ pub async fn unzip_no_seek( // Create dir or write file if is_dir { - tokio::fs::create_dir_all(path).await?; + fs_err::tokio::create_dir_all(path).await?; } else { if let Some(parent) = path.parent() { - tokio::fs::create_dir_all(parent).await?; + fs_err::tokio::create_dir_all(parent).await?; } - let file = tokio::fs::File::create(path).await?; + let file = fs_err::tokio::File::create(path).await?; let mut writer = tokio::io::BufWriter::new(file); let mut reader = entry.reader_mut().compat(); tokio::io::copy(&mut reader, &mut writer).await?;