mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
removed shortcut migration
This commit is contained in:
parent
0b01f9d282
commit
b8f642a2d4
1 changed files with 0 additions and 31 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue