mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Only convert relative paths if its a valid path
This commit is contained in:
parent
ec1a06108d
commit
ebd6f177a9
1 changed files with 8 additions and 5 deletions
|
|
@ -134,13 +134,16 @@ namespace Flow.Launcher.Plugin
|
||||||
get { return _pluginDirectory; }
|
get { return _pluginDirectory; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
Uri uriResult;
|
|
||||||
bool IsUriScheme = Uri.TryCreate(IcoPath, UriKind.Absolute, out uriResult)
|
|
||||||
&& (uriResult.Scheme == Uri.UriSchemeHttp || uriResult.Scheme == Uri.UriSchemeHttps);
|
|
||||||
_pluginDirectory = value;
|
_pluginDirectory = value;
|
||||||
if (!string.IsNullOrEmpty(IcoPath) && !Path.IsPathRooted(IcoPath) && !IsUriScheme)
|
if (!string.IsNullOrEmpty(IcoPath) && !Path.IsPathRooted(IcoPath))
|
||||||
{
|
{
|
||||||
IcoPath = Path.Combine(value, IcoPath);
|
string absPath = Path.Combine(value, IcoPath);
|
||||||
|
// Only convert relative paths if its a valid path
|
||||||
|
if (File.Exists(absPath))
|
||||||
|
{
|
||||||
|
IcoPath = absPath;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue