mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 18:07:22 +01:00
access, not write
This commit is contained in:
parent
adafc1dbcf
commit
7221ca0555
1 changed files with 1 additions and 1 deletions
|
|
@ -112,9 +112,9 @@ public sealed class CachedFileProvider : IDisposable
|
|||
{
|
||||
_logger.LogDebug("Copying {hash} from cold storage: {path}", hash, coldStorageFilePath);
|
||||
var tempFileName = destinationFilePath + ".dl";
|
||||
coldStorageFilePath.LastWriteTimeUtc = DateTime.UtcNow;
|
||||
File.Copy(coldStorageFilePath.FullName, tempFileName, true);
|
||||
File.Move(tempFileName, destinationFilePath, true);
|
||||
coldStorageFilePath.LastAccessTimeUtc = DateTime.UtcNow;
|
||||
_metrics.IncGauge(MetricsAPI.GaugeFilesTotal);
|
||||
_metrics.IncGauge(MetricsAPI.GaugeFilesTotalSize, new FileInfo(destinationFilePath).Length);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue