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.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.IO.Abstractions;
|
using System.IO.Abstractions;
|
||||||
|
using Wox.Plugin.Logger;
|
||||||
|
|
||||||
namespace Wox.Infrastructure.Storage
|
namespace Wox.Infrastructure.Storage
|
||||||
{
|
{
|
||||||
@@ -123,8 +125,15 @@ namespace Wox.Infrastructure.Storage
|
|||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
// Update the Version file to the current version of powertoys
|
try
|
||||||
File.WriteAllText(FilePath, currentPowerToysVersion);
|
{
|
||||||
|
// 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