override buffer size only for windows

This commit is contained in:
Luke Pulverenti 2016-01-06 17:47:32 -05:00
parent 67f9a986a7
commit 27e846893a

View file

@ -275,10 +275,14 @@ namespace MediaBrowser.Server.Implementations.IO
{
var newWatcher = new FileSystemWatcher(path, "*")
{
IncludeSubdirectories = true,
InternalBufferSize = 32767
IncludeSubdirectories = true
};
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
newWatcher.InternalBufferSize = 32767;
}
newWatcher.NotifyFilter = NotifyFilters.CreationTime |
NotifyFilters.DirectoryName |
NotifyFilters.FileName |