mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[PTRun]Fix access crash when saving settings version (#31104)
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions;
|
||||
using Wox.Plugin.Logger;
|
||||
|
||||
namespace Wox.Infrastructure.Storage
|
||||
{
|
||||
@@ -122,9 +124,16 @@ namespace Wox.Infrastructure.Storage
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Update the Version file to the current version of powertoys
|
||||
File.WriteAllText(FilePath, currentPowerToysVersion);
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Log.Exception($"Error in saving version at <{FilePath}>", e, GetType());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user