mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[Settings][Backup/Restore]Honor user documents directory (#21312)
This commit is contained in:
committed by
GitHub
parent
d1f55bb9ea
commit
d73fae4f95
@@ -364,14 +364,14 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
|||||||
/// Method <c>GetSettingsBackupAndRestoreDir</c> returns the path the backup and restore location.
|
/// Method <c>GetSettingsBackupAndRestoreDir</c> returns the path the backup and restore location.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This will return a default location based on Environment Variables if non is set.
|
/// This will return a default location based on user documents if non is set.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public string GetSettingsBackupAndRestoreDir()
|
public string GetSettingsBackupAndRestoreDir()
|
||||||
{
|
{
|
||||||
string settingsBackupAndRestoreDir = GetRegSettingsBackupAndRestoreRegItem("SettingsBackupAndRestoreDir");
|
string settingsBackupAndRestoreDir = GetRegSettingsBackupAndRestoreRegItem("SettingsBackupAndRestoreDir");
|
||||||
if (settingsBackupAndRestoreDir == null)
|
if (settingsBackupAndRestoreDir == null)
|
||||||
{
|
{
|
||||||
settingsBackupAndRestoreDir = Environment.ExpandEnvironmentVariables("%USERPROFILE%\\Documents\\PowerToys\\Backup");
|
settingsBackupAndRestoreDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "PowerToys\\Backup");
|
||||||
}
|
}
|
||||||
|
|
||||||
return settingsBackupAndRestoreDir;
|
return settingsBackupAndRestoreDir;
|
||||||
|
|||||||
Reference in New Issue
Block a user