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
path: root/src
diff options
context:
space:
mode:
authorAlexis Christoforides <alexis@thenull.net>2019-08-10 00:42:44 +0300
committerSteve Pfister <steveisok@users.noreply.github.com>2019-08-10 00:42:44 +0300
commitc976905c1de06786292a6fb01656b43650f262c9 (patch)
tree5ddeaa1ff6288c0c2ab8a47db3e36a4d6c6423f4 /src
parent9ba63a081f00a16482a05a194a0c38ec2662c036 (diff)
Fix another bug in https://github.com/mono/mono/pull/16049 (#327)
Diffstat (limited to 'src')
-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 f451ab60e8..af543fc6fd 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
@@ -483,7 +483,7 @@ namespace System.IO
// Remove the base directory prefix and add the paired event to the list of
// events to skip and notify the user of the rename
if (events[pairedId].Span.Length >= _fullDirectory.Length
- && ((ReadOnlySpan<char>) events[pairedId].Span).Equals(_fullDirectory.AsSpan(0, events[pairedId].Span.Length), StringComparison.OrdinalIgnoreCase))
+ && _fullDirectory.AsSpan().Equals(events[pairedId].Span.Slice(0, _fullDirectory.Length), StringComparison.OrdinalIgnoreCase)
{
ReadOnlySpan<char> newPathRelativeName = events[pairedId].Span.Slice(_fullDirectory.Length);
watcher.NotifyRenameEventArgs(WatcherChangeTypes.Renamed, newPathRelativeName, relativePath);