diff options
author | Alexis Christoforides <alexis@thenull.net> | 2019-08-09 17:13:09 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-08-09 17:13:09 +0300 |
commit | 9ba63a081f00a16482a05a194a0c38ec2662c036 (patch) | |
tree | 17d24d23935c583e565fe1c0662ee8cd2c260c37 /src | |
parent | 1cf71cce533cb31d6b6efb4b1163cebaedcaacd2 (diff) |
Fix use of Span.Slice(int start() introduced in https://github.com/mono/mono/pull/16049 (#323)
Diffstat (limited to 'src')
-rw-r--r-- | src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs b/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs index cd124256af..f451ab60e8 100644 --- a/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs +++ b/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs @@ -437,7 +437,7 @@ namespace System.IO ReadOnlySpan<char> relativePath = ReadOnlySpan<char>.Empty; if (!path.Equals(_fullDirectory, StringComparison.OrdinalIgnoreCase) && path.Length >= _fullDirectory.Length - && _fullDirectory.AsSpan().Equals(path.Slice(_fullDirectory.Length), StringComparison.OrdinalIgnoreCase)) + && _fullDirectory.AsSpan().Equals(path.Slice(0, _fullDirectory.Length), StringComparison.OrdinalIgnoreCase)) { // Remove the root directory to get the relative path relativePath = path.Slice(_fullDirectory.Length); |