New+: Fixed issue with files and folders containing only numbers#45439
Open
cgaarden wants to merge 1 commit intomicrosoft:mainfrom
Open
Conversation
Contributor
Author
|
Hi @niels9001, here's the PR for the folders with numbers only in them + various permutations. I've also ensured that hidden and systems files are excluded from the list of templates. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Supersedes #41465
PR Checklist
Detailed Description of the Pull Request / Additional comments
Fix for where template file or folder only contained numbers
// Filename cases to support
// type | filename | result
// [file] | 01. First entry.txt | First entry.txt
// [folder] | 02. Second entry | Second entry
// [folder] | 03 Third entry | Third entry
// [file] | 04 Fourth entry.txt | Fourth entry.txt
// [file] | 05.Fifth entry.txt | Fifth entry.txt
// [folder] | 001231 | 001231
// [file] | 001231.txt | 001231.txt
// [file] | 13. 0123456789012345.txt | 0123456789012345.txt
Fix for where hidden files are shown in the list of templates
Instead of excluding based on filename (desktop.ini) exclude based on hidden and system attribute being set
Validation Steps Performed
Before fix
Notice

1) Folders with numbers only aren't displayed on the context menu
2) Files with extension with numbers only show extension on the context menu
3) Some hidden files are shown
After fixes
Scenario 1
New+ Setting: Hide leading digits…: Yes

New+ Setting: Hide file extension: Yes
New+ Setting: Replace variables: No
Scenario 2
New+ Setting: Hide leading digits…: No

New+ Setting: Hide file extension: No
New+ Setting: Replace variables: No
Scenario 3
New+ Setting: Hide leading digits…: Yes
New+ Setting: Hide file extension: Yes
New+ Setting: Replace variables: Yes