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

Commit b78d62c

Browse files
committed
Cache npath data so we don't keep creating stuff over and over again
1 parent edc6441 commit b78d62c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/GitHub.Api/IO/NiceIO.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,11 +753,14 @@ public static NPath HomeDirectory
753753
}
754754
}
755755

756+
private static NPath systemTemp;
756757
public static NPath SystemTemp
757758
{
758759
get
759760
{
760-
return new NPath(FileSystem.GetTempPath());
761+
if (systemTemp == null)
762+
systemTemp = new NPath(FileSystem.GetTempPath());
763+
return systemTemp;
761764
}
762765
}
763766

0 commit comments

Comments
 (0)