Browse Source

removed shortcut migration

Luke Pulverenti 11 years ago
parent
commit
b8f642a2d4
1 changed files with 0 additions and 31 deletions
  1. 0 31
      MediaBrowser.ServerApplication/MainStartup.cs

+ 0 - 31
MediaBrowser.ServerApplication/MainStartup.cs

@@ -214,8 +214,6 @@ namespace MediaBrowser.ServerApplication
             SystemEvents.SessionEnding += SystemEvents_SessionEnding;
             SystemEvents.SessionEnding += SystemEvents_SessionEnding;
             SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
             SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
 
 
-            MigrateShortcuts(appPaths.RootFolderPath);
-
             _appHost = new ApplicationHost(appPaths, logManager);
             _appHost = new ApplicationHost(appPaths, logManager);
 
 
             _app = new App(_appHost, _appHost.LogManager.GetLogger("App"), runService);
             _app = new App(_appHost, _appHost.LogManager.GetLogger("App"), runService);
@@ -537,34 +535,5 @@ namespace MediaBrowser.ServerApplication
             /// </summary>
             /// </summary>
             SEM_NOOPENFILEERRORBOX = 0x8000
             SEM_NOOPENFILEERRORBOX = 0x8000
         }
         }
-
-        private static void MigrateShortcuts(string directory)
-        {
-            Directory.CreateDirectory(directory);
-
-            foreach (var file in Directory.EnumerateFiles(directory, "*.lnk", SearchOption.AllDirectories).ToList())
-            {
-                MigrateShortcut(file);
-            }
-        }
-
-        private static void MigrateShortcut(string file)
-        {
-            var newFile = Path.ChangeExtension(file, ".mblink");
-
-            try
-            {
-                var resolvedPath = FileSystem.ResolveShortcut(file);
-
-                if (!string.IsNullOrEmpty(resolvedPath))
-                {
-                    FileSystem.CreateShortcut(newFile, resolvedPath);
-                }
-            }
-            finally
-            {
-                File.Delete(file);
-            }
-        }
     }
     }
 }
 }