aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/IO/FileRefresher.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-11-04 15:51:59 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-11-04 15:51:59 -0400
commit67ad1db6b77b2c2cb6d81c22808d99564a5f3ebc (patch)
tree680573c554a180eff4c06e40c9dd17556570eff9 /Emby.Server.Implementations/IO/FileRefresher.cs
parent72aaecb27930e04aa356febf35db2372bc417166 (diff)
add environment info
Diffstat (limited to 'Emby.Server.Implementations/IO/FileRefresher.cs')
-rw-r--r--Emby.Server.Implementations/IO/FileRefresher.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/IO/FileRefresher.cs b/Emby.Server.Implementations/IO/FileRefresher.cs
index 295ecc465..39033249f 100644
--- a/Emby.Server.Implementations/IO/FileRefresher.cs
+++ b/Emby.Server.Implementations/IO/FileRefresher.cs
@@ -13,6 +13,7 @@ using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Logging;
+using MediaBrowser.Model.System;
using MediaBrowser.Model.Tasks;
using MediaBrowser.Model.Threading;
@@ -32,8 +33,9 @@ namespace Emby.Server.Implementations.IO
public string Path { get; private set; }
public event EventHandler<EventArgs> Completed;
+ private readonly IEnvironmentInfo _environmentInfo;
- public FileRefresher(string path, IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, ITaskManager taskManager, ILogger logger, ITimerFactory timerFactory)
+ public FileRefresher(string path, IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, ITaskManager taskManager, ILogger logger, ITimerFactory timerFactory, IEnvironmentInfo environmentInfo)
{
logger.Debug("New file refresher created for {0}", path);
Path = path;
@@ -44,6 +46,7 @@ namespace Emby.Server.Implementations.IO
TaskManager = taskManager;
Logger = logger;
_timerFactory = timerFactory;
+ _environmentInfo = environmentInfo;
AddPath(path);
}
@@ -226,11 +229,11 @@ namespace Emby.Server.Implementations.IO
private bool IsFileLocked(string path)
{
- //if (Environment.OSVersion.Platform != PlatformID.Win32NT)
- //{
- // // Causing lockups on linux
- // return false;
- //}
+ if (_environmentInfo.OperatingSystem != OperatingSystem.Windows)
+ {
+ // Causing lockups on linux
+ return false;
+ }
try
{