Skip to content

Commit efbb91b

Browse files
ahmelsayedfabiocav
authored andcommitted
Ensure directory for test data exists before writing to it.
1 parent cef1bfc commit efbb91b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/WebJobs.Script.WebHost/Extensions/FunctionMetadataExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ private static async Task<string> GetTestData(string testDataPath, ScriptJobHost
121121
{
122122
if (!File.Exists(testDataPath))
123123
{
124+
FileUtility.EnsureDirectoryExists(Path.GetDirectoryName(testDataPath));
124125
await FileUtility.WriteAsync(testDataPath, string.Empty);
125126
}
126127

0 commit comments

Comments
 (0)