Skip to content

Commit b1ed323

Browse files
EnsureAppDataPath should return full path even when skipping path creation
1 parent b424677 commit b1ed323

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/Certify.Shared/Utils/EnvironmentUtil.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public static string EnsuredAppDataPath(string subDirectory = null, bool skipCre
111111
{
112112
CreateAndApplyRestrictedACL(path);
113113

114-
if (subDirectory != null)
114+
if (!string.IsNullOrEmpty(subDirectory))
115115
{
116116
parts.Add(subDirectory);
117117
path = Path.Combine(parts.ToArray());
@@ -122,6 +122,11 @@ public static string EnsuredAppDataPath(string subDirectory = null, bool skipCre
122122
}
123123
}
124124
}
125+
else if (!string.IsNullOrEmpty(subDirectory))
126+
{
127+
parts.Add(subDirectory);
128+
path = Path.Combine(parts.ToArray());
129+
}
125130

126131
return path;
127132
}

0 commit comments

Comments
 (0)