diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-09-03 14:40:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-03 14:40:29 -0400 |
| commit | 52aea85e7fa5b3e3eef965b434b79829ccecde46 (patch) | |
| tree | 912730228c1efe3b6cdb19bc8be594f5302ab84a /Emby.Server.Implementations/IO/ManagedFileSystem.cs | |
| parent | 9cbc016b0a1f93779d6503aba0298e5bda897ea2 (diff) | |
| parent | e653eef44ff5dd7e568816d43b9e0d50b2293387 (diff) | |
Merge pull request #4031 from Bond-009/warn28
Fix some warnings
Diffstat (limited to 'Emby.Server.Implementations/IO/ManagedFileSystem.cs')
| -rw-r--r-- | Emby.Server.Implementations/IO/ManagedFileSystem.cs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs index ab6483bf9..3cb025111 100644 --- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs +++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs @@ -398,30 +398,6 @@ namespace Emby.Server.Implementations.IO } } - public virtual void SetReadOnly(string path, bool isReadOnly) - { - if (OperatingSystem.Id != OperatingSystemId.Windows) - { - return; - } - - var info = GetExtendedFileSystemInfo(path); - - if (info.Exists && info.IsReadOnly != isReadOnly) - { - if (isReadOnly) - { - File.SetAttributes(path, File.GetAttributes(path) | FileAttributes.ReadOnly); - } - else - { - var attributes = File.GetAttributes(path); - attributes = RemoveAttribute(attributes, FileAttributes.ReadOnly); - File.SetAttributes(path, attributes); - } - } - } - public virtual void SetAttributes(string path, bool isHidden, bool isReadOnly) { if (OperatingSystem.Id != OperatingSystemId.Windows) @@ -707,14 +683,6 @@ namespace Emby.Server.Implementations.IO return Directory.EnumerateFileSystemEntries(path, "*", searchOption); } - public virtual void SetExecutable(string path) - { - if (OperatingSystem.Id == OperatingSystemId.Darwin) - { - RunProcess("chmod", "+x \"" + path + "\"", Path.GetDirectoryName(path)); - } - } - private static void RunProcess(string path, string args, string workingDirectory) { using (var process = Process.Start(new ProcessStartInfo |
