Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@@ -587,11 +587,7 @@ namespace System.IO
// If we shouldn't include subdirectories, check if this path's parent is the watch directory
// Check if the parent is the root. If so, then we'll continue processing based on the name.
// If it isn't, then this will be set to false and we'll skip the name processing since it's irrelevant.
#if MONO
return _includeChildren || _fullDirectory.AsSpan().StartsWith(System.IO.Path.GetDirectoryName(eventPath.ToString()), StringComparison.OrdinalIgnoreCase);
#else
return _includeChildren || _fullDirectory.AsSpan().StartsWith(System.IO.Path.GetDirectoryName(eventPath), StringComparison.OrdinalIgnoreCase);
#endif
}
private long FindRenameChangePairedChange(
@@ -621,21 +617,15 @@ namespace System.IO
if (path.IsEmpty || path.Length == 0)
return false;
if (!isFile)
return FileSystem.DirectoryExists(path);
#if MONO
if (!isFile)
return Directory.Exists(path.ToString());
return path[path.Length - 1] == '/'
? false
: File.Exists(path.ToString());
#else
if (!isFile)
return FileSystem.DirectoryExists(path);
return PathInternal.IsDirectorySeparator(path[path.Length - 1])
#endif
? false
: FileSystem.FileExists(path);
#endif
}
}
}