removed shortcut migration

This commit is contained in:
Luke Pulverenti 2013-10-28 08:27:26 -04:00
parent 0b01f9d282
commit b8f642a2d4

View file

@ -214,8 +214,6 @@ namespace MediaBrowser.ServerApplication
SystemEvents.SessionEnding += SystemEvents_SessionEnding;
SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;
MigrateShortcuts(appPaths.RootFolderPath);
_appHost = new ApplicationHost(appPaths, logManager);
_app = new App(_appHost, _appHost.LogManager.GetLogger("App"), runService);
@ -537,34 +535,5 @@ namespace MediaBrowser.ServerApplication
/// </summary>
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);
}
}
}
}