fix!: Remove automatic macos directory migration

This code existed as an attempt to avoid a major version bump as a
result of the .NET 8 upgrade. However, this just adds confusion. The
migration step is now required to perform the directory migration and
the details have been added to the v7.0 upgrade guide.
pull/231/head
Robert Dailey 2 months ago
parent 604785ccf6
commit 92f7194aed

@ -8,11 +8,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
This release contains **BREAKING CHANGES**. See the [v7.0 Upgrade Guide][breaking7] for required
changes you may need to make.
[breaking7]: https://recyclarr.dev/wiki/upgrade-guide/v7.0/
### Changed ### Changed
- The app data directory on OSX has changed. It now lives in `Library/Application Support/recyclarr` - **BREAKING**: The app data directory on OSX has changed. It now lives at `~/Library/Application
instead of `~/.config/recyclarr`. Recyclarr will attempt to move this directory when run. If it Support/recyclarr` instead of `~/.config/recyclarr`. Users will need to run `recyclarr migrate` to
can't, then manual intervention is needed by users (e.g. `recyclarr migrate`). move the directory (or do it manually).
- Slightly improved display of version number when using `-v` option. - Slightly improved display of version number when using `-v` option.
### Fixed ### Fixed

@ -2,10 +2,7 @@ using System.IO.Abstractions;
namespace Recyclarr.Platform; namespace Recyclarr.Platform;
public class DefaultAppDataSetup( public class DefaultAppDataSetup(IEnvironment env, IFileSystem fs)
IEnvironment env,
IFileSystem fs,
IRuntimeInformation runtimeInfo)
{ {
public IAppPaths CreateAppPaths(string? appDataDirectoryOverride = null) public IAppPaths CreateAppPaths(string? appDataDirectoryOverride = null)
{ {
@ -37,27 +34,6 @@ public class DefaultAppDataSetup(
"to place data files. Please use the --app-data option to explicitly set a location for these files."); "to place data files. Please use the --app-data option to explicitly set a location for these files.");
} }
appData = fs.Path.Combine(appData, AppPaths.DefaultAppDataDirectoryName); return fs.Path.Combine(appData, AppPaths.DefaultAppDataDirectoryName);
try
{
if (runtimeInfo.IsPlatformOsx())
{
var oldAppData = fs.Path.Combine(env.GetFolderPath(Environment.SpecialFolder.UserProfile), ".config",
AppPaths.DefaultAppDataDirectoryName);
if (fs.DirectoryInfo.New(oldAppData).Exists)
{
// Attempt to move the directory for the user. If this cannot be done, then the MoveOsxAppDataDotnet8
// migration step (which is required) will force the issue to the user and provide remediation steps.
fs.Directory.Move(oldAppData, appData);
}
}
}
catch (IOException)
{
// Ignore failures here because we'll let the migration step take care of it.
}
return appData;
} }
} }

Loading…
Cancel
Save