Fix cache write path (#1976)

This commit is contained in:
Cheena Malhotra
2023-03-30 14:12:57 -07:00
committed by GitHub
parent 07495ea3b6
commit 0c16db9907

View File

@@ -149,7 +149,7 @@ namespace Microsoft.SqlTools.Authentication.Utility
{
fillIvKeyIfNeeded();
var encryptedData = EncryptionUtils.AesEncrypt(data, this._key!, this._iv!);
File.WriteAllText(this._storageCreationProperties.CacheFileName, Convert.ToBase64String(encryptedData));
File.WriteAllText(this._storageCreationProperties.CacheFilePath, Convert.ToBase64String(encryptedData));
}
catch (Exception e)
{
@@ -191,7 +191,7 @@ namespace Microsoft.SqlTools.Authentication.Utility
try
{
var text = File.ReadAllText(_storageCreationProperties.CacheFilePath);
var text = File.ReadAllText(this._storageCreationProperties.CacheFilePath);
if (text != null)
{
cachedStoreData = Convert.FromBase64String(text);