diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-02-01 14:24:15 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-02-01 14:24:15 -0500 |
| commit | 37352785acef4db99301c1e88624cf48133ec979 (patch) | |
| tree | 15638d697cc56a0a774bf261de9814c9034f8e42 /MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs | |
| parent | f14e9b8d3af98f6ffbe243b105f96f46e8cf3b06 (diff) | |
| parent | f5ebeddbf5104092ce584486689af6640125054f (diff) | |
Merge branch 'beta'
Diffstat (limited to 'MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs index 85ea8ec57..184b72d8f 100644 --- a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs +++ b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs @@ -471,11 +471,11 @@ namespace MediaBrowser.Server.Implementations.IO { if (_updateTimer == null) { - _updateTimer = new Timer(TimerStopped, null, TimeSpan.FromSeconds(ConfigurationManager.Configuration.RealtimeLibraryMonitorDelay), TimeSpan.FromMilliseconds(-1)); + _updateTimer = new Timer(TimerStopped, null, TimeSpan.FromSeconds(ConfigurationManager.Configuration.LibraryMonitorDelay), TimeSpan.FromMilliseconds(-1)); } else { - _updateTimer.Change(TimeSpan.FromSeconds(ConfigurationManager.Configuration.RealtimeLibraryMonitorDelay), TimeSpan.FromMilliseconds(-1)); + _updateTimer.Change(TimeSpan.FromSeconds(ConfigurationManager.Configuration.LibraryMonitorDelay), TimeSpan.FromMilliseconds(-1)); } } } @@ -513,12 +513,18 @@ namespace MediaBrowser.Server.Implementations.IO private bool IsFileLocked(string path) { + if (Environment.OSVersion.Platform != PlatformID.Win32NT) + { + // Causing lockups on linux + return false; + } + try { var data = _fileSystem.GetFileSystemInfo(path); if (!data.Exists - || data.Attributes.HasFlag(FileAttributes.Directory) + || data.IsDirectory // Opening a writable stream will fail with readonly files || data.Attributes.HasFlag(FileAttributes.ReadOnly)) |
