"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "MediaBrowser.Controller/ClientEvent/ClientEventLogger.cs" between
jellyfin-10.8.9.tar.gz and jellyfin-10.8.10.tar.gz

About: Jellyfin is a suite of multimedia applications that puts you in control of managing and streaming your digital media.

ClientEventLogger.cs  (jellyfin-10.8.9):ClientEventLogger.cs  (jellyfin-10.8.10)
skipping to change at line 26 skipping to change at line 26
public ClientEventLogger(IServerApplicationPaths applicationPaths) public ClientEventLogger(IServerApplicationPaths applicationPaths)
{ {
_applicationPaths = applicationPaths; _applicationPaths = applicationPaths;
} }
/// <inheritdoc /> /// <inheritdoc />
public async Task<string> WriteDocumentAsync(string clientName, string c lientVersion, Stream fileContents) public async Task<string> WriteDocumentAsync(string clientName, string c lientVersion, Stream fileContents)
{ {
var fileName = $"upload_{clientName}_{clientVersion}_{DateTime.UtcNo w:yyyyMMddHHmmss}_{Guid.NewGuid():N}.log"; var fileName = $"upload_{clientName}_{clientVersion}_{DateTime.UtcNo w:yyyyMMddHHmmss}_{Guid.NewGuid():N}.log";
var logFilePath = Path.Combine(_applicationPaths.LogDirectoryPath, f ileName); var logFilePath = Path.Combine(_applicationPaths.LogDirectoryPath, f ileName);
if (!Path.GetFullPath(logFilePath).StartsWith(_applicationPaths.LogD
irectoryPath, StringComparison.Ordinal))
{
throw new ArgumentException("Path resolved to filename not in lo
g directory");
}
await using var fileStream = new FileStream(logFilePath, FileMode.Cr eateNew, FileAccess.Write, FileShare.None); await using var fileStream = new FileStream(logFilePath, FileMode.Cr eateNew, FileAccess.Write, FileShare.None);
await fileContents.CopyToAsync(fileStream).ConfigureAwait(false); await fileContents.CopyToAsync(fileStream).ConfigureAwait(false);
return fileName; return fileName;
} }
} }
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)