Use TempPath for WebView

This commit is contained in:
2023-08-10 12:57:00 +02:00
parent e1630e9919
commit 8290b57cd4
3 changed files with 15 additions and 3 deletions

View File

@ -8,7 +8,7 @@ namespace Elwig.Helpers {
public TempFile() : this(null) { }
public TempFile(string? ext) : this(Path.Combine(Path.GetTempPath(), "Elwig"), ext) { }
public TempFile(string? ext) : this(App.TempPath, ext) { }
public TempFile(string dir, string? ext) {
FilePath = Path.Combine(dir, Path.GetRandomFileName().Replace(".", "") + (ext != null ? $".{ext}" : ""));