Skip to content

Commit

Permalink
Update ScanUnsupportedChars.ps1 for long path detection
Browse files Browse the repository at this point in the history
The script has a bug due to which it cannot detect the long path. This change fixes that bug.
  • Loading branch information
surendernitj authored Jun 6, 2024
1 parent ddd13ae commit f66d3ae
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ScanUnsupportedChars/ScanUnsupportedChars.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
Note - this script might report false positive i.e. a file name is supported but this script might say its not supported.
This is by design to keep the script simple and allow customer to rename such files proactively.
Version 5.5
Last Modified Date: May 6th, 2024
Version 5.6
Last Modified Date: June 5th, 2024
Note: Please open powershell in full screen mode to avoid output truncation.
Expand Down Expand Up @@ -410,7 +410,6 @@ public class ListFiles
// Assume directoryPath passed in is already prefixed with \\?\
public void FindFilesAndDirs(string directoryPath)
{
SharePathLength = directoryPath.Length;
WIN32_FIND_DATA findData;
if (directoryPath.EndsWith(@"\"))
Expand Down Expand Up @@ -884,4 +883,4 @@ else

Write-Host "==================== Scan Results Finished ========================="

Remove-Variable listFile
Remove-Variable listFile

0 comments on commit f66d3ae

Please sign in to comment.