diff options
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs b/MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs index ce4665b26..afdd4e623 100644 --- a/MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs +++ b/MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller; +using MediaBrowser.Common.IO; +using MediaBrowser.Controller; using System.IO; namespace MediaBrowser.Server.Startup.Common.Migrations @@ -6,10 +7,12 @@ namespace MediaBrowser.Server.Startup.Common.Migrations public class DeprecatePlugins : IVersionMigration { private readonly IServerApplicationPaths _appPaths; + private readonly IFileSystem _fileSystem; - public DeprecatePlugins(IServerApplicationPaths appPaths) + public DeprecatePlugins(IServerApplicationPaths appPaths, IFileSystem fileSystem) { _appPaths = appPaths; + _fileSystem = fileSystem; } public void Run() @@ -21,7 +24,7 @@ namespace MediaBrowser.Server.Startup.Common.Migrations { try { - File.Delete(Path.Combine(_appPaths.PluginsPath, filename)); + _fileSystem.DeleteFile(Path.Combine(_appPaths.PluginsPath, filename)); } catch { |
