Linux tabs restore

This commit is contained in:
2022-02-04 01:07:55 +01:00
parent 2e43cca9fd
commit f9c675eb7c
5 changed files with 15 additions and 5 deletions

View File

@@ -85,7 +85,10 @@ namespace FileTime.Providers.Local
public bool CanHandlePath(string path)
{
var normalizedPath = NormalizePath(path);
return _rootContainers.Any(r => normalizedPath.StartsWith(NormalizePath(r.Name)));
Func<IContainer, bool> match = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
? c => normalizedPath.StartsWith(NormalizePath(c.Name))
: c => normalizedPath.StartsWith(NormalizePath("/" + c.Name));
return _rootContainers.Any(match);
}
public void SetParent(IContainer container) => _parent = container;