Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Christoforides <alexis@thenull.net>2019-08-09 17:13:09 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2019-08-09 17:13:09 +0300
commit9ba63a081f00a16482a05a194a0c38ec2662c036 (patch)
tree17d24d23935c583e565fe1c0662ee8cd2c260c37
parent1cf71cce533cb31d6b6efb4b1163cebaedcaacd2 (diff)
Fix use of Span.Slice(int start() introduced in https://github.com/mono/mono/pull/16049 (#323)
-rw-r--r--src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs2
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);