mirror of
https://github.com/Sonarr/Sonarr
synced 2025-03-10 14:15:29 +00:00
New: Migrate appdata folder for .NET 8 on OSX
This commit is contained in:
parent
518f1799dc
commit
1a5fa185d1
1 changed files with 11 additions and 0 deletions
|
@ -75,6 +75,17 @@ namespace NzbDrone.Common.EnvironmentInfo
|
|||
{
|
||||
try
|
||||
{
|
||||
if (OsInfo.IsOsx)
|
||||
{
|
||||
var userAppDataFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile, Environment.SpecialFolderOption.DoNotVerify), ".config", "Sonarr");
|
||||
|
||||
if (_diskProvider.FolderExists(userAppDataFolder) && !_diskProvider.FileExists(_appFolderInfo.GetConfigPath()))
|
||||
{
|
||||
_diskTransferService.MirrorFolder(userAppDataFolder, _appFolderInfo.AppDataFolder);
|
||||
_diskProvider.DeleteFolder(userAppDataFolder, true);
|
||||
}
|
||||
}
|
||||
|
||||
var oldDbFile = Path.Combine(_appFolderInfo.AppDataFolder, "nzbdrone.db");
|
||||
|
||||
if (_startupContext.Args.ContainsKey(StartupContext.APPDATA))
|
||||
|
|
Loading…
Add table
Reference in a new issue