From 0c16db99074ef6a841f3e8fd78d3d9ab078f12c1 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com> Date: Thu, 30 Mar 2023 14:12:57 -0700 Subject: [PATCH] Fix cache write path (#1976) --- .../MSALEncryptedCacheHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.SqlTools.Authentication/MSALEncryptedCacheHelper.cs b/src/Microsoft.SqlTools.Authentication/MSALEncryptedCacheHelper.cs index 805b7360..96f54750 100644 --- a/src/Microsoft.SqlTools.Authentication/MSALEncryptedCacheHelper.cs +++ b/src/Microsoft.SqlTools.Authentication/MSALEncryptedCacheHelper.cs @@ -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);