Skip to content

Commit 5415748

Browse files
committed
Merge pull request #408 from neoeinstein/tolerate-temp-file-already-deleted-when-trying-to-delete
Tolerate temp file directory not existing when cleaning up
2 parents 2fca958 + 8e8ed2f commit 5415748

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

GitVersionTask/TempFileTracker.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ static TempFileTracker()
1313

1414
public static void DeleteTempFiles()
1515
{
16+
if (!Directory.Exists(TempPath))
17+
{
18+
return;
19+
}
20+
1621
foreach (var file in Directory.GetFiles(TempPath))
1722
{
1823
if (File.GetLastWriteTime(file) < DateTime.Now.AddDays(-1))

0 commit comments

Comments
 (0)