Skip to content

[release/8.0-staging] Support setting ACLs on file paths longer than MAX_PATH #113801

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

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 22, 2025

Backport of #92460 to release/8.0-staging. Replaces #109674, which was already approved for servicing.

/cc @jeffhandley @karakasa @adamsitnik

Customer Impact

  • Customer reported
  • Found internally

Customer @AliveDevil requested this fix be backported to the LTS .NET 8 release, with the following comments:

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.

Regression

  • Yes
  • No

Testing

This fix was merged into .NET 9 in September 2023, and has been in place since Preview 1. A new unit test was added as part of the original fix, and the fix also reuses an existing approach and PathInternal.EnsureExtendedPrefixIfNeeded helper method.

Risk

Low. Targeted fix for the specific ACL scenario.

karakasa and others added 2 commits March 22, 2025 23:59
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
@ghost ghost added the area-System.IO label Mar 23, 2025
Copy link
Contributor

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

@jeffhandley jeffhandley added the Servicing-approved Approved for servicing release label Mar 23, 2025
@jeffhandley
Copy link
Member

Failure is an unrelated networking test

@jeffhandley jeffhandley merged commit 3ace3f7 into release/8.0-staging Mar 23, 2025
111 of 114 checks passed
@jeffhandley jeffhandley deleted the backport/pr-92460-to-release/8.0-staging branch March 23, 2025 01:57
@github-actions github-actions bot locked and limited conversation to collaborators Apr 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy