Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private async Task<List<ContainerFile>> GetCertificateFiles(LoadBalancer loadBal

var keyType = cert.PrivateKey.KeyData is RSA ? "rsa" : "ecdsa";

var certFilePath = Path.GetTempFileName();
var certFilePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());

File.WriteAllText(certFilePath, $"{keyData}\n{certData}");

Expand All @@ -115,7 +115,7 @@ private async Task<List<ContainerFile>> GetCertificateFiles(LoadBalancer loadBal
}


var certListFilePath = Path.GetTempFileName();
var certListFilePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
File.WriteAllText(certListFilePath, certlist.ToString());

containerFiles.Add(new ContainerFile()
Expand Down Expand Up @@ -175,7 +175,7 @@ public async Task ApplyConfiguration(LoadBalancer loadBalancer)
};


var localConfigPath = Path.GetTempFileName();
var localConfigPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
var configPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources", "haproxy.cfg");

if (!File.Exists(configPath))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public async Task ApplyConfiguration(List<Monitoring.Models.Monitor> monitors)
if (container == null)
container = await CreateContainer();

var localConfigPath = Path.GetTempFileName();
var localConfigPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
var configPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources", "collectd.conf");

if (!File.Exists(configPath))
Expand Down Expand Up @@ -136,4 +136,4 @@ public async Task Shutdown()
await _containerManager.DeleteContainer(container.Id);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public async Task ApplyConfiguration(List<Monitoring.Models.Monitor> monitors)
}


var localConfigPath = Path.GetTempFileName();
var localConfigPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
var configPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources", "telegraf.conf");

if (!File.Exists(configPath))
Expand Down Expand Up @@ -162,4 +162,4 @@ public async Task Shutdown()
{
await Shutdown(_serviceName);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private async Task<Container> CreateContainer(string name, string filename, stri
null
);

var tempFilePath = Path.GetTempFileName();
var tempFilePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
try
{
File.WriteAllText(tempFilePath, fileData);
Expand Down
2 changes: 1 addition & 1 deletion tilework.core/Services/Core/DockerServiceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public async Task CopyFileToContainer(string id, string localPath, string contai
throw new FileNotFoundException($"The file at path '{localPath}' does not exist.");


string tempTarPath = Path.GetTempFileName();
string tempTarPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());

try
{
Expand Down