diff --git a/src/modules/Hosts/Hosts.Tests/Hosts.Tests.csproj b/src/modules/Hosts/Hosts.Tests/Hosts.Tests.csproj index 4611541e1134..bf30015f006e 100644 --- a/src/modules/Hosts/Hosts.Tests/Hosts.Tests.csproj +++ b/src/modules/Hosts/Hosts.Tests/Hosts.Tests.csproj @@ -19,8 +19,8 @@ - - + + diff --git a/src/modules/Hosts/Hosts/Hosts.csproj b/src/modules/Hosts/Hosts/Hosts.csproj index 5aba83637308..9a4385c918f1 100644 --- a/src/modules/Hosts/Hosts/Hosts.csproj +++ b/src/modules/Hosts/Hosts/Hosts.csproj @@ -33,7 +33,7 @@ - + diff --git a/src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj b/src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj index 675e47ce1bac..c0c29cd1841c 100644 --- a/src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj +++ b/src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj @@ -43,7 +43,7 @@ - + diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/FancyZonesEditor.csproj b/src/modules/fancyzones/editor/FancyZonesEditor/FancyZonesEditor.csproj index dbf04291b26f..8bb4c15cb73e 100644 --- a/src/modules/fancyzones/editor/FancyZonesEditor/FancyZonesEditor.csproj +++ b/src/modules/fancyzones/editor/FancyZonesEditor/FancyZonesEditor.csproj @@ -48,7 +48,7 @@ - + diff --git a/src/modules/imageresizer/tests/ImageResizerUITest.csproj b/src/modules/imageresizer/tests/ImageResizerUITest.csproj index 47ef9ae22de5..ecce5e00efcd 100644 --- a/src/modules/imageresizer/tests/ImageResizerUITest.csproj +++ b/src/modules/imageresizer/tests/ImageResizerUITest.csproj @@ -54,7 +54,7 @@ - + diff --git a/src/modules/imageresizer/ui/ImageResizerUI.csproj b/src/modules/imageresizer/ui/ImageResizerUI.csproj index 7b711821921b..16dc6effa4e0 100644 --- a/src/modules/imageresizer/ui/ImageResizerUI.csproj +++ b/src/modules/imageresizer/ui/ImageResizerUI.csproj @@ -48,7 +48,7 @@ - 12.2.5 + 17.2.3 diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Folder.UnitTests/InternalQueryFolderTests.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.Folder.UnitTests/InternalQueryFolderTests.cs index ee638cbeffb6..265ec1024699 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Folder.UnitTests/InternalQueryFolderTests.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Folder.UnitTests/InternalQueryFolderTests.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using System.IO; using System.IO.Abstractions.TestingHelpers; using System.Linq; using Microsoft.Plugin.Folder.Sources; @@ -31,7 +32,7 @@ public void SetupMock() { @"c:\Test\b\", new MockDirectoryData() }, }); - _queryFileSystemInfoMock = new QueryFileSystemInfo(_fileSystem.DirectoryInfo); + _queryFileSystemInfoMock = new QueryFileSystemInfo(_fileSystem.DirectoryInfo, MatchType.Simple, FileAttributes.Hidden | FileAttributes.System); } [TestMethod] diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Folder.UnitTests/Microsoft.Plugin.Folder.UnitTests.csproj b/src/modules/launcher/Plugins/Microsoft.Plugin.Folder.UnitTests/Microsoft.Plugin.Folder.UnitTests.csproj index b290eefd22ae..996aafb94a68 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Folder.UnitTests/Microsoft.Plugin.Folder.UnitTests.csproj +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Folder.UnitTests/Microsoft.Plugin.Folder.UnitTests.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Microsoft.Plugin.Folder.csproj b/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Microsoft.Plugin.Folder.csproj index bcab8d0db2f9..c678d3838bf0 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Microsoft.Plugin.Folder.csproj +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Microsoft.Plugin.Folder.csproj @@ -54,7 +54,7 @@ - + diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Sources/QueryFileSystemInfo.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Sources/QueryFileSystemInfo.cs index 950b6d9ee71d..b67a329c84db 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Sources/QueryFileSystemInfo.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Sources/QueryFileSystemInfo.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation +// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -12,23 +12,27 @@ namespace Microsoft.Plugin.Folder.Sources public class QueryFileSystemInfo : IQueryFileSystemInfo { private readonly IDirectoryInfoFactory _directoryInfoFactory; + private readonly MatchType _matchType; + private readonly FileAttributes _attributesToSkip; - public QueryFileSystemInfo(IDirectoryInfoFactory directoryInfoFactory) + public QueryFileSystemInfo(IDirectoryInfoFactory directoryInfoFactory, MatchType matchType = MatchType.Win32, FileAttributes attributesToSkip = FileAttributes.Hidden) { _directoryInfoFactory = directoryInfoFactory; + _matchType = matchType; + _attributesToSkip = attributesToSkip; } public IEnumerable MatchFileSystemInfo(string search, string incompleteName, bool isRecursive) { // search folder and add results var directoryInfo = _directoryInfoFactory.FromDirectoryName(search); - var fileSystemInfos = directoryInfo.EnumerateFileSystemInfos(incompleteName, new EnumerationOptions() + var fileSystemInfos = directoryInfo.EnumerateFileSystemInfos(incompleteName, new EnumerationOptions { - MatchType = MatchType.Win32, + MatchType = _matchType, RecurseSubdirectories = isRecursive, IgnoreInaccessible = true, ReturnSpecialDirectories = false, - AttributesToSkip = FileAttributes.Hidden, + AttributesToSkip = _attributesToSkip, MatchCasing = MatchCasing.PlatformDefault, }); diff --git a/src/modules/launcher/Wox.Infrastructure/Wox.Infrastructure.csproj b/src/modules/launcher/Wox.Infrastructure/Wox.Infrastructure.csproj index dd04d324a365..f0082bc01317 100644 --- a/src/modules/launcher/Wox.Infrastructure/Wox.Infrastructure.csproj +++ b/src/modules/launcher/Wox.Infrastructure/Wox.Infrastructure.csproj @@ -44,7 +44,7 @@ - + \ No newline at end of file diff --git a/src/modules/previewpane/GcodePreviewHandler/GcodePreviewHandler.csproj b/src/modules/previewpane/GcodePreviewHandler/GcodePreviewHandler.csproj index 3603a4927d61..95c9eb312a63 100644 --- a/src/modules/previewpane/GcodePreviewHandler/GcodePreviewHandler.csproj +++ b/src/modules/previewpane/GcodePreviewHandler/GcodePreviewHandler.csproj @@ -32,7 +32,7 @@ - + diff --git a/src/modules/previewpane/MarkdownPreviewHandler/MarkdownPreviewHandler.csproj b/src/modules/previewpane/MarkdownPreviewHandler/MarkdownPreviewHandler.csproj index a7e34e4fb736..c55662d7544c 100644 --- a/src/modules/previewpane/MarkdownPreviewHandler/MarkdownPreviewHandler.csproj +++ b/src/modules/previewpane/MarkdownPreviewHandler/MarkdownPreviewHandler.csproj @@ -41,7 +41,7 @@ - + diff --git a/src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandler.csproj b/src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandler.csproj index 36bd528164be..a0b69f9b092c 100644 --- a/src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandler.csproj +++ b/src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandler.csproj @@ -28,7 +28,7 @@ - + diff --git a/src/modules/previewpane/PdfPreviewHandler/PdfPreviewHandler.csproj b/src/modules/previewpane/PdfPreviewHandler/PdfPreviewHandler.csproj index 1a1883e2a39f..18f18add35cc 100644 --- a/src/modules/previewpane/PdfPreviewHandler/PdfPreviewHandler.csproj +++ b/src/modules/previewpane/PdfPreviewHandler/PdfPreviewHandler.csproj @@ -32,7 +32,7 @@ - + diff --git a/src/modules/previewpane/common/PreviewHandlerCommon.csproj b/src/modules/previewpane/common/PreviewHandlerCommon.csproj index ce58cb40986e..beb44727cd3a 100644 --- a/src/modules/previewpane/common/PreviewHandlerCommon.csproj +++ b/src/modules/previewpane/common/PreviewHandlerCommon.csproj @@ -27,6 +27,6 @@ - + \ No newline at end of file diff --git a/src/settings-ui/Settings.UI.Library/Settings.UI.Library.csproj b/src/settings-ui/Settings.UI.Library/Settings.UI.Library.csproj index c076e7f5d476..08f857313fa7 100644 --- a/src/settings-ui/Settings.UI.Library/Settings.UI.Library.csproj +++ b/src/settings-ui/Settings.UI.Library/Settings.UI.Library.csproj @@ -25,7 +25,7 @@ - + diff --git a/src/settings-ui/Settings.UI.UnitTests/Settings.UI.UnitTests.csproj b/src/settings-ui/Settings.UI.UnitTests/Settings.UI.UnitTests.csproj index ade0f6a92ee7..7021b458f489 100644 --- a/src/settings-ui/Settings.UI.UnitTests/Settings.UI.UnitTests.csproj +++ b/src/settings-ui/Settings.UI.UnitTests/Settings.UI.UnitTests.csproj @@ -28,7 +28,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - +