mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Fix crash on invalid chars in path
This commit is contained in:
@@ -136,7 +136,13 @@ namespace Wox.Plugin.SystemPlugins.FileSystem
|
||||
}
|
||||
|
||||
// change to search in current directory
|
||||
var parentDir = Path.GetDirectoryName(input);
|
||||
string parentDir = null;
|
||||
try
|
||||
{
|
||||
parentDir = Path.GetDirectoryName(input);
|
||||
}
|
||||
catch {}
|
||||
|
||||
if (!string.IsNullOrEmpty(parentDir) && results.Count == 0)
|
||||
{
|
||||
parentDir = parentDir.TrimEnd('\\', '/');
|
||||
|
||||
Reference in New Issue
Block a user