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

Overwriting file on Windows gives PermissionDenied #35

Open
ChrisGreenaway opened this issue Sep 18, 2019 · 1 comment
Open

Overwriting file on Windows gives PermissionDenied #35

ChrisGreenaway opened this issue Sep 18, 2019 · 1 comment

Comments

@ChrisGreenaway
Copy link

Running this on Windows:

{
    let file = AtomicFile::new_with_tmpdir(&path, AllowOverwrite, &temporary_directory);
    file.write(|f| f.write_all(bytes1))?;
}
{
    let file = AtomicFile::new_with_tmpdir(&path, AllowOverwrite, &temporary_directory);
    file.write(|f| f.write_all(bytes2))?;
}

Sometimes gives:

WriteError(Internal(Os { code: 5, kind: PermissionDenied, message: "Access is denied." }))

Error seen on both Windows 7 and Windows 10.

@acheronfail
Copy link

I'm also seeing this on the windows-2019 GitHub Actions machines.

My test cases create a temporary directory, and atomic writes inside the directory fail with the same error that @ChrisGreenaway describes.

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

No branches or pull requests

2 participants