mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
One more shot at #19
This commit is contained in:
parent
e821d82ac2
commit
f3b367628a
@ -500,14 +500,14 @@ namespace MediaBrowser.Common.Implementations
|
|||||||
if (ConfigurationManager.CommonConfiguration.RunAtStartup)
|
if (ConfigurationManager.CommonConfiguration.RunAtStartup)
|
||||||
{
|
{
|
||||||
//Copy our shortut into the startup folder for this user
|
//Copy our shortut into the startup folder for this user
|
||||||
File.Copy(ProductShortcutPath, Environment.GetFolderPath(Environment.SpecialFolder.Startup), true);
|
File.Copy(ProductShortcutPath, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup),Path.GetFileName(ProductShortcutPath) ?? "MBstartup.lnk"), true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Remove our shortcut from the startup folder for this user
|
//Remove our shortcut from the startup folder for this user
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File.Delete(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), Path.GetFileName(ProductShortcutPath)));
|
File.Delete(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), Path.GetFileName(ProductShortcutPath) ?? "MBstartup.lnk"));
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException)
|
catch (FileNotFoundException)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user