Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

FileSystem - consider making directory creation invulnerable to transient UnauthorizedAccessException #106

Copy link
Copy link

Description

@madelson
Issue body actions

For file locks, we have this line of code:

                try { System.IO.Directory.CreateDirectory(this.Directory); }
                catch (Exception ex)
                {
                    throw new InvalidOperationException($"Failed to ensure that lock file directory {this.Directory} exists", ex);
                }

Very rarely when running TestParallelism, I've seen this fail with UnauthorizedAccessException, presumably due to some form of concurrent directory creation. We can make this less vulnerable by being willing to retry directory creation a certain number of times when hitting that particular exception.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.