aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations/IO/ManagedFileSystem.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-03-29 02:25:37 -0400
committerGitHub <noreply@github.com>2017-03-29 02:25:37 -0400
commit88e3fcfdc78fcab201fad72466bf2aa50b453210 (patch)
tree1e40408a0167aa2dca47ac07b16afa26e94d18d1 /Emby.Common.Implementations/IO/ManagedFileSystem.cs
parent75f58d5665322a5045649aed89aecfef011b315c (diff)
parent9f9e81089f5606e958bc8c3f0e4d73475d02372a (diff)
Merge pull request #2554 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Common.Implementations/IO/ManagedFileSystem.cs')
-rw-r--r--Emby.Common.Implementations/IO/ManagedFileSystem.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/Emby.Common.Implementations/IO/ManagedFileSystem.cs b/Emby.Common.Implementations/IO/ManagedFileSystem.cs
index 3fe20f659..0c1c02cd5 100644
--- a/Emby.Common.Implementations/IO/ManagedFileSystem.cs
+++ b/Emby.Common.Implementations/IO/ManagedFileSystem.cs
@@ -5,6 +5,7 @@ using System.Linq;
using System.Text;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
+using MediaBrowser.Model.System;
namespace Emby.Common.Implementations.IO
{
@@ -18,17 +19,21 @@ namespace Emby.Common.Implementations.IO
private readonly bool _supportsAsyncFileStreams;
private char[] _invalidFileNameChars;
private readonly List<IShortcutHandler> _shortcutHandlers = new List<IShortcutHandler>();
- private bool EnableFileSystemRequestConcat = true;
+ private bool EnableFileSystemRequestConcat;
private string _tempPath;
- public ManagedFileSystem(ILogger logger, bool supportsAsyncFileStreams, bool enableManagedInvalidFileNameChars, bool enableFileSystemRequestConcat, string tempPath)
+ public ManagedFileSystem(ILogger logger, IEnvironmentInfo environmentInfo, string tempPath)
{
Logger = logger;
- _supportsAsyncFileStreams = supportsAsyncFileStreams;
+ _supportsAsyncFileStreams = true;
_tempPath = tempPath;
- EnableFileSystemRequestConcat = enableFileSystemRequestConcat;
- SetInvalidFileNameChars(enableManagedInvalidFileNameChars);
+
+ // On Linux, this needs to be true or symbolic links are ignored
+ EnableFileSystemRequestConcat = environmentInfo.OperatingSystem != MediaBrowser.Model.System.OperatingSystem.Windows &&
+ environmentInfo.OperatingSystem != MediaBrowser.Model.System.OperatingSystem.OSX;
+
+ SetInvalidFileNameChars(environmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows);
}
public void AddShortcutHandler(IShortcutHandler handler)