Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 8058262

Browse files
committed
AssertDir() on INSPECT_VARS
1 parent 1d13069 commit 8058262

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ServiceStack.Text/Inspect.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ public static void DefaultVarsFilter(object anonArgs)
2828
? inspectVarsPath.Replace('/','\\')
2929
: inspectVarsPath.Replace('\\','/')
3030
: VarsName;
31+
32+
if (varsPath.IndexOf(Path.PathSeparator) >= 0)
33+
Path.GetDirectoryName(varsPath).AssertDir();
34+
3135
File.WriteAllText(varsPath, anonArgs.ToSafeJson());
3236
}
3337
catch (Exception ex)

0 commit comments

Comments
 (0)