From d8d5dd487326dd3fccf4e9f30cd8f7e3783fcfda Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 12 Jan 2015 22:46:44 -0500 Subject: make channel access opt-in rather than opt out --- MediaBrowser.ServerApplication/Native/Autorun.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.ServerApplication/Native/Autorun.cs') diff --git a/MediaBrowser.ServerApplication/Native/Autorun.cs b/MediaBrowser.ServerApplication/Native/Autorun.cs index 0262f711e..593bb7955 100644 --- a/MediaBrowser.ServerApplication/Native/Autorun.cs +++ b/MediaBrowser.ServerApplication/Native/Autorun.cs @@ -1,4 +1,5 @@ -using System; +using MediaBrowser.Common.IO; +using System; using System.IO; namespace MediaBrowser.ServerApplication.Native @@ -12,7 +13,8 @@ namespace MediaBrowser.ServerApplication.Native /// Configures the specified autorun. /// /// if set to true [autorun]. - public static void Configure(bool autorun) + /// The file system. + public static void Configure(bool autorun, IFileSystem fileSystem) { var shortcutPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), "Media Browser 3", "Media Browser Server.lnk"); @@ -26,7 +28,7 @@ namespace MediaBrowser.ServerApplication.Native else { //Remove our shortcut from the startup folder for this user - File.Delete(Path.Combine(startupPath, Path.GetFileName(shortcutPath) ?? "MBstartup.lnk")); + fileSystem.DeleteFile(Path.Combine(startupPath, Path.GetFileName(shortcutPath) ?? "MBstartup.lnk")); } } } -- cgit v1.2.3