From 6797dfea48edf6b50e0a6cc188fa33e16615c24c Mon Sep 17 00:00:00 2001 From: Levi B Date: Mon, 27 Oct 2014 12:55:59 -0700 Subject: [PATCH] Fix %APPDATA% detection logic. --- .../DataProtectionServices.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNet.Security.DataProtection/DataProtectionServices.cs b/src/Microsoft.AspNet.Security.DataProtection/DataProtectionServices.cs index cc3d2d7731..5ba4a766b1 100644 --- a/src/Microsoft.AspNet.Security.DataProtection/DataProtectionServices.cs +++ b/src/Microsoft.AspNet.Security.DataProtection/DataProtectionServices.cs @@ -138,7 +138,7 @@ namespace Microsoft.AspNet.Security.DataProtection #if !ASPNETCORE50 // Environment.GetFolderPath returns null if the user profile isn't loaded. string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); - if (folderPath != null) + if (!String.IsNullOrEmpty(folderPath)) { // TODO: Remove BETA moniker from below. return new DirectoryInfo(Path.Combine(folderPath, "ASP.NET", "keys-BETA"));