You've already forked linux-packaging-mono
Imported Upstream version 6.4.0.137
Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
parent
e9207cf623
commit
ef583813eb
@@ -396,7 +396,12 @@ namespace System.IO
|
||||
/// </summary>
|
||||
private bool MatchPattern(ReadOnlySpan<char> relativePath)
|
||||
{
|
||||
#if MONO
|
||||
if (relativePath.IsWhiteSpace())
|
||||
return false;
|
||||
#endif
|
||||
ReadOnlySpan<char> name = IO.Path.GetFileName(relativePath);
|
||||
|
||||
if (name.Length == 0)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -637,5 +637,24 @@ namespace System.IO.Tests
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if MONO && (!MOBILE || MOBILE_DESKTOP_HOST)
|
||||
[Fact]
|
||||
[PlatformSpecific(TestPlatforms.AnyUnix)]
|
||||
public void FileSystemWatcher_WatchFileWithSpaces()
|
||||
{
|
||||
using (var testDirectory = new TempDirectory(GetTestFilePath()))
|
||||
using (var file = new TempFile(Path.Combine(testDirectory.Path, " ")))
|
||||
using (var watcher = new FileSystemWatcher(testDirectory.Path, "*"))
|
||||
{
|
||||
NotifyFilters filter = NotifyFilters.LastWrite | NotifyFilters.FileName;
|
||||
watcher.NotifyFilter = filter;
|
||||
|
||||
Action action = () => File.AppendAllText(file.Path, "longText!");
|
||||
|
||||
ExpectNoEvent(watcher, WatcherChangeTypes.Changed, action, expectedPath: file.Path);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user