aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/IO/FileRefresher.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-10-25 15:02:04 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-10-25 15:02:04 -0400
commitef6b90b8e6e6c317fcda85a392c79324f91250db (patch)
tree570c78c0915d3608399f003038b66d56e5e29e84 /MediaBrowser.Server.Implementations/IO/FileRefresher.cs
parentedbe28d9fc3091121b7e2323fe42d62a70c9e351 (diff)
make controller project portable
Diffstat (limited to 'MediaBrowser.Server.Implementations/IO/FileRefresher.cs')
-rw-r--r--MediaBrowser.Server.Implementations/IO/FileRefresher.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/MediaBrowser.Server.Implementations/IO/FileRefresher.cs b/MediaBrowser.Server.Implementations/IO/FileRefresher.cs
index 1c9a05753..beb9600c7 100644
--- a/MediaBrowser.Server.Implementations/IO/FileRefresher.cs
+++ b/MediaBrowser.Server.Implementations/IO/FileRefresher.cs
@@ -4,11 +4,13 @@ using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using CommonIO;
+using MediaBrowser.Model.IO;
using MediaBrowser.Common.Events;
+using MediaBrowser.Common.IO;
using MediaBrowser.Common.ScheduledTasks;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Logging;
@@ -237,7 +239,7 @@ namespace MediaBrowser.Server.Implementations.IO
|| data.IsDirectory
// Opening a writable stream will fail with readonly files
- || data.Attributes.HasFlag(FileAttributes.ReadOnly))
+ || data.IsReadOnly)
{
return false;
}
@@ -256,12 +258,12 @@ namespace MediaBrowser.Server.Implementations.IO
// But if the server only has readonly access, this is going to cause this entire algorithm to fail
// So we'll take a best guess about our access level
var requestedFileAccess = ConfigurationManager.Configuration.SaveLocalMeta
- ? FileAccess.ReadWrite
- : FileAccess.Read;
+ ? FileAccessMode.ReadWrite
+ : FileAccessMode.Read;
try
{
- using (_fileSystem.GetFileStream(path, FileMode.Open, requestedFileAccess, FileShare.ReadWrite))
+ using (_fileSystem.GetFileStream(path, FileOpenMode.Open, requestedFileAccess, FileShareMode.ReadWrite))
{
//file is not locked
return false;