Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: concurrent downloads again #323

Merged
merged 1 commit into from
Nov 24, 2024

Conversation

qryxip
Copy link
Contributor

@qryxip qryxip commented Nov 24, 2024

Fixup for eb51646 and effd7a7.

Reason

The following code shows PermissionDenied on Windows, and DirectoryNotEmpty on Linux. I thought just checking the destination exists is simple and reliable.

let tmpdir = ::tempfile::tempdir()?;
let tmpdir = tmpdir.path();

std::fs::create_dir(tmpdir.join("dir1"))?;
std::fs::write(tmpdir.join("dir1").join("a.txt"), b"")?;

std::fs::create_dir(tmpdir.join("dir2"))?;
std::fs::write(tmpdir.join("dir2").join("a.txt"), b"")?;

let err = std::fs::rename(tmpdir.join("dir1"), tmpdir.join("dir2")).unwrap_err();
dbg!(err.kind());

Copy link

codecov bot commented Nov 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.02%. Comparing base (effd7a7) to head (471ddc1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #323   +/-   ##
=======================================
  Coverage   51.02%   51.02%           
=======================================
  Files          36       36           
  Lines        2677     2677           
=======================================
  Hits         1366     1366           
  Misses       1311     1311           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@decahedron1 decahedron1 merged commit f90a3b6 into pykeio:main Nov 24, 2024
12 checks passed
qryxip added a commit to qryxip/ort that referenced this pull request Nov 24, 2024
qryxip added a commit to VOICEVOX/ort that referenced this pull request Nov 25, 2024
Fixes the problem where building multiple ort-sys `download-binaries`
fail.

Cherry picked from eb51646, eb51646, and pykeio#323.

Refs: VOICEVOX/voicevox_core#859, pykeio#322
Refs: eb51646
Refs: effd7a7, pykeio#323
Co-authored-by: Carson M. <carson@pyke.io>
decahedron1 added a commit that referenced this pull request Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants