Compare commits

..

1 commit

Author SHA1 Message Date
Davide 60f6418720 check if directory exists 2021-11-25 20:59:21 +01:00
5 changed files with 17 additions and 7 deletions

View file

@ -1,6 +1,6 @@
# Microsoft PowerToys
![Hero image for Microsoft PowerToys](doc/images/overview/PT_hero_image.png)
<img src="./doc/images/overview/PT%20hero%20image.png"/>
[How to use PowerToys][usingPowerToys-docs-link] | [Downloads & Release notes][github-release-link] | [Contributing to PowerToys](#contributing) | [What's Happening](#whats-happening) | [Roadmap](#powertoys-roadmap)

View file

Before

Width:  |  Height:  |  Size: 447 KiB

After

Width:  |  Height:  |  Size: 447 KiB

View file

@ -1,10 +1,13 @@
// 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.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Wox.Infrastructure.Storage;
using Wox.Plugin.Logger;
namespace Microsoft.Plugin.Program.Storage
{
@ -33,7 +36,18 @@ namespace Microsoft.Plugin.Program.Storage
Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
Environment.GetFolderPath(Environment.SpecialFolder.CommonDesktopDirectory),
};
return paths;
var invalidPaths = new List<string>();
foreach (var path in paths)
{
if (!Directory.Exists(path))
{
Log.Warn($"Directory {path} does not exist and will be ignored", typeof(Win32ProgramFileSystemWatchers));
invalidPaths.Add(path);
}
}
return paths.Except(invalidPaths).ToArray();
}
// Initializes the FileSystemWatchers

View file

@ -1002,9 +1002,6 @@ Made with 💗 by Microsoft and the PowerToys community.</value>
<data name="FileExplorerPreview_AffectsAllUsers.Title" xml:space="preserve">
<value>The settings on this page affect all users on the system</value>
</data>
<data name="FileExplorerPreview_TogglePreviewPane.Text" xml:space="preserve">
<value>Please ensure that Preview Pane is open by toggling the view with Alt + P in File Explorer</value>
</data>
<data name="FileExplorerPreview_RebootRequired.Title" xml:space="preserve">
<value>A reboot may be required for changes to these settings to take effect</value>
</data>

View file

@ -35,7 +35,6 @@
/>
<controls:SettingsGroup x:Uid="FileExplorerPreview_PreviewPane_GroupSettings">
<TextBlock x:Uid="FileExplorerPreview_TogglePreviewPane" Margin="0,0,0,8" Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
<controls:Setting x:Uid="FileExplorerPreview_ToggleSwitch_Preview_SVG" Icon="&#xE91B;">
<controls:Setting.ActionContent>
<ToggleSwitch IsOn="{x:Bind Mode=TwoWay, Path=ViewModel.SVGRenderIsEnabled}"