Merge branch 'upstream'
Former-commit-id: 7ed16a5f70c5e54c03fe100716c591c61d1f6de9
This commit is contained in:
commit
3c88c42982
@ -1 +1 @@
|
||||
ea71a3011a5bc17919912f79ba0b43a78e90dc46
|
||||
3775be9539849d1d8fe1bb59578a3adaf60af8f2
|
@ -1 +1 @@
|
||||
4ff63b001b91e85857354dbd41ddd6d142ef0881
|
||||
3f393279c2b9f8af3a3d9ab21d3febd3472c0af1
|
@ -435,7 +435,9 @@ namespace System.IO
|
||||
// The base FileSystemWatcher does a match check against the relative path before combining with
|
||||
// the root dir; however, null is special cased to signify the root dir, so check if we should use that.
|
||||
ReadOnlySpan<char> relativePath = ReadOnlySpan<char>.Empty;
|
||||
if (!path.Equals(_fullDirectory, StringComparison.OrdinalIgnoreCase))
|
||||
if (!path.Equals(_fullDirectory, StringComparison.OrdinalIgnoreCase)
|
||||
&& path.Length >= _fullDirectory.Length
|
||||
&& _fullDirectory.AsSpan().Equals(path.Slice(_fullDirectory.Length), StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// Remove the root directory to get the relative path
|
||||
relativePath = path.Slice(_fullDirectory.Length);
|
||||
@ -479,9 +481,18 @@ namespace System.IO
|
||||
else
|
||||
{
|
||||
// Remove the base directory prefix and add the paired event to the list of
|
||||
// events to skip and notify the user of the rename
|
||||
ReadOnlySpan<char> newPathRelativeName = events[pairedId].Span.Slice(_fullDirectory.Length);
|
||||
watcher.NotifyRenameEventArgs(WatcherChangeTypes.Renamed, newPathRelativeName, relativePath);
|
||||
// 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))
|
||||
{
|
||||
ReadOnlySpan<char> newPathRelativeName = events[pairedId].Span.Slice(_fullDirectory.Length);
|
||||
watcher.NotifyRenameEventArgs(WatcherChangeTypes.Renamed, newPathRelativeName, relativePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
//if the base directory prefix isn't there, just use the full absolute path
|
||||
watcher.NotifyRenameEventArgs(WatcherChangeTypes.Renamed, events[pairedId].Span, relativePath);
|
||||
}
|
||||
|
||||
// Create a new list, if necessary, and add the event
|
||||
if (handledRenameEvents == null)
|
||||
|
@ -1 +0,0 @@
|
||||
b22c1001f96026227bfeb8765492c71397b2a250
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
38948683e151f6009580f20359e51270510c49d5
|
@ -1 +0,0 @@
|
||||
5cb9029bf1147f755252018acf04c7ea947b214a
|
@ -1 +0,0 @@
|
||||
b06cf34859cb7c700dfd8f87f8038fd2efbfa21c
|
@ -1 +0,0 @@
|
||||
7696c03b218eb7d3c30c858963d98687f17f8d9e
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
2d54316954f4200997856156289df2e6115d51e0
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
aeff3ad988e25fea8dc3561277a0ceab064f8fc7
|
||||
b22c1001f96026227bfeb8765492c71397b2a250
|
Binary file not shown.
@ -1 +1 @@
|
||||
76c7d6d06756c34ea550afe61ca4e5db8bda0fc3
|
||||
38948683e151f6009580f20359e51270510c49d5
|
@ -1 +1 @@
|
||||
06b44b45a10fea51ee8e8b72b9f74e3e370f7465
|
||||
5cb9029bf1147f755252018acf04c7ea947b214a
|
@ -1 +1 @@
|
||||
3cefc59b2da1b7487c9d7c8a5e2ad00a082e6705
|
||||
b06cf34859cb7c700dfd8f87f8038fd2efbfa21c
|
@ -1 +1 @@
|
||||
27baccadd0abecaa5f45f58d9b5c505ac4f85963
|
||||
7696c03b218eb7d3c30c858963d98687f17f8d9e
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user