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

PathUtilities misbehavior on linux #45631

Open
rmannibucau opened this issue Dec 25, 2024 · 1 comment
Open

PathUtilities misbehavior on linux #45631

rmannibucau opened this issue Dec 25, 2024 · 1 comment
Labels
Area-CLI untriaged Request triage from a team member

Comments

@rmannibucau
Copy link

Hi,

https://github.com/dotnet/sdk/blob/main/src/Common/PathUtilities.cs#L24 uses mkdir on linux and Directory.CreateDirectory on windows.
This leads to a behavior difference where some directory can not be created if TMPDIR is a path which doesn't exist on linux (it fails) and it passes on windows.

I propose to drop the linux specificity and keep using the Directory API + chmod after directory creation if 0700 perms are desired.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-CLI untriaged Request triage from a team member labels Dec 25, 2024
@KalleOlaviNiemitalo
Copy link
Contributor

KalleOlaviNiemitalo commented Dec 25, 2024

One could perhaps use Directory.CreateDirectory(String, UnixFileMode) within #if NET7_0_OR_GREATER. I'm not sure whether PathUtilities.cs is built in any project that targets .NET Standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CLI untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants