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 1 month ago
parent 604785ccf6
commit 92f7194aed

@ -8,11 +8,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [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
- The app data directory on OSX has changed. It now lives in `Library/Application Support/recyclarr`
instead of `~/.config/recyclarr`. Recyclarr will attempt to move this directory when run. If it
can't, then manual intervention is needed by users (e.g. `recyclarr migrate`).
- **BREAKING**: The app data directory on OSX has changed. It now lives at `~/Library/Application
Support/recyclarr` instead of `~/.config/recyclarr`. Users will need to run `recyclarr migrate` to
move the directory (or do it manually).
- Slightly improved display of version number when using `-v` option.
### Fixed

@ -2,10 +2,7 @@ using System.IO.Abstractions;
namespace Recyclarr.Platform;
public class DefaultAppDataSetup(
IEnvironment env,
IFileSystem fs,
IRuntimeInformation runtimeInfo)
public class DefaultAppDataSetup(IEnvironment env, IFileSystem fs)
{
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.");
}
appData = 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;
return fs.Path.Combine(appData, AppPaths.DefaultAppDataDirectoryName);
}
}

Loading…
Cancel
Save