diff --git a/Snowflake.Data/Client/SnowflakeCredentialManager/SnowflakeCredentialManagerFileImpl.cs b/Snowflake.Data/Client/SnowflakeCredentialManager/SnowflakeCredentialManagerFileImpl.cs index b4e780c1b..b3aa40fb4 100644 --- a/Snowflake.Data/Client/SnowflakeCredentialManager/SnowflakeCredentialManagerFileImpl.cs +++ b/Snowflake.Data/Client/SnowflakeCredentialManager/SnowflakeCredentialManagerFileImpl.cs @@ -50,7 +50,7 @@ internal SnowflakeCredentialManagerFileImpl(FileOperations fileOperations, Direc private void SetCredentialCachePath(ref string _jsonCacheDirectory, ref string _jsonCacheFilePath) { var customDirectory = _environmentOperations.GetEnvironmentVariable(CredentialCacheDirectoryEnvironmentName); - _jsonCacheDirectory = string.IsNullOrEmpty(customDirectory) ? _environmentOperations.GetFolderPath(Environment.SpecialFolder.UserProfile) : customDirectory; + _jsonCacheDirectory = string.IsNullOrEmpty(customDirectory) ? HomeDirectoryProvider.HomeDirectory(_environmentOperations) : customDirectory; _jsonCacheFilePath = Path.Combine(_jsonCacheDirectory, CredentialCacheFileName); s_logger.Info($"Setting the json credential cache path to {_jsonCacheFilePath}"); }