Fix CI test failure

This commit is contained in:
Vic 2023-01-20 15:36:14 +08:00
parent 71a2f996db
commit b739bb49d3

View file

@ -254,7 +254,7 @@ namespace Flow.Launcher.Plugin.SharedCommands
/// <returns></returns>
public static bool PathContains(string parentPath, string subPath, bool allowEqual = false)
{
var rel = Path.GetRelativePath(parentPath, subPath);
var rel = Path.GetRelativePath(parentPath.EnsureTrailingSlash(), subPath);
return (rel != "." || allowEqual)
&& rel != ".."
&& !rel.StartsWith("../")