Skip to content

Commit aee389c

Browse files
imadityaaAditya Abhishek
andauthored
ScriptExecutor should upload the logs after move (#574)
* scriptExec * bump --------- Co-authored-by: Aditya Abhishek <adityaa@microsoft.com>
1 parent 7991f29 commit aee389c

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.19
1+
2.1.20

src/VirtualClient/VirtualClient.Actions/ScriptExecutor/ScriptExecutor.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,15 +314,10 @@ private async Task RequestUploadAndMoveToLogsDirectory(
314314
return;
315315
}
316316

317-
if (this.TryGetContentStoreManager(out IBlobManager blobManager))
318-
{
319-
await this.RequestUpload(sourcePath);
320-
}
321-
317+
string destPath = sourcePath;
322318
await (this.FileOperationsRetryPolicy ?? Policy.NoOpAsync()).ExecuteAsync(() =>
323319
{
324320
string fileName = Path.GetFileName(sourcePath);
325-
string destPath;
326321

327322
if (!string.IsNullOrEmpty(sourceRoot))
328323
{
@@ -344,6 +339,11 @@ private async Task RequestUploadAndMoveToLogsDirectory(
344339
this.fileSystem.File.Move(sourcePath, destPath, true);
345340
return Task.CompletedTask;
346341
});
342+
343+
if (this.TryGetContentStoreManager(out IBlobManager blobManager))
344+
{
345+
await this.RequestUpload(destPath);
346+
}
347347
}
348348
}
349349
}

0 commit comments

Comments
 (0)