Skip to content

Commit f3e4bbc

Browse files
committed
Fix failing Profile tests
1 parent e429c1d commit f3e4bbc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Common/Commands.Common.Authentication/AzureSessionInitializer.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ static ContextAutosaveSettings InitializeSessionSettings(IDataStore store, strin
9999
}
100100
else
101101
{
102-
FileUtilities.EnsureDirectoryExists(profileDirectory);
102+
string directoryPath = Path.GetDirectoryName(profileDirectory);
103+
if (!store.DirectoryExists(directoryPath))
104+
{
105+
store.CreateDirectory(directoryPath);
106+
}
103107
string autoSavePath = Path.Combine(profileDirectory, settingsFile);
104108
store.WriteFile(autoSavePath, JsonConvert.SerializeObject(result));
105109
result.Mode = ContextSaveMode.CurrentUser;

0 commit comments

Comments
 (0)