dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.06k stars 4.69k forks source link

[8.0] Request Backport for #91980 #106682

Open AliveDevil opened 1 month ago

AliveDevil commented 1 month ago

Description

Blocked by .NET 8 failing on setting acl on long paths (#91980)

Please backport this as mentioned here https://github.com/dotnet/runtime/pull/92460#issuecomment-1733247784, or provide out-of-band System.IO.FileSystem.AccessControl.dll as consumable NuGet package.

Reproduction Steps

See description.

Expected behavior

See description.

Actual behavior

See description.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

dotnet-policy-service[bot] commented 1 month ago

Tagging subscribers to this area: @dotnet/area-system-io See info in area-owners.md if you want to be subscribed.

adamsitnik commented 1 month ago

Blocked by .NET 8 failing on setting acl on long paths

Could you please describe your scenario with a more detail (I need strong business justification to justify backporting)? Thanks!

AliveDevil commented 1 month ago

Currently in the process of migrating a codebase from .NET framework to .NET 8 due to .NET Framework not handling long paths correctly.

When .NET 8 doesn’t support long paths like this, there’s no point in going forward, as the next possible LTS version is 10 at the end of 2025.

Scenario is a file synchronization tool, which sets Acls on files, based on remote attributes.

As a workaround I’ve used reflection and a lambdaexpression to get access to the Persist(string) overload, to call that directly with the \\?\-prefix.

Business reason: this is a bug in a core LTS library, that is supported for several years. I‘d understand it, if there’s a newer LTS library available, but STS 9 isn’t even released yet, and 8 is the current LTS, while the mentioned PR was merged before 8 got released. This should’ve been fixed by the .NET 8.0.0 release in Nov 2023. I shouldn’t have to resort to reflection to workaround a core bug.