diff options
| author | Cody Robibero <cody@robibe.ro> | 2022-06-04 17:23:40 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2022-06-06 09:16:11 -0400 |
| commit | eb55f47f2e9afbd82db66eef538b8d89cacb77b9 (patch) | |
| tree | 26087797568ec34b393ab318a9de69ddb11e73ad /Jellyfin.Server/Program.cs | |
| parent | 3a95d4b04ebb5aa612b0d175261fbe473a0e60fa (diff) | |
Merge pull request #7810 from Bond-009/unaccpattern
(cherry picked from commit 5e343d30e198ca57926a13e1a6b05ae232091d86)
Signed-off-by: crobibero <cody@robibe.ro>
Diffstat (limited to 'Jellyfin.Server/Program.cs')
| -rw-r--r-- | Jellyfin.Server/Program.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 1323d8a48..2bda8d290 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -545,12 +545,14 @@ namespace Jellyfin.Server const string ResourcePath = "Jellyfin.Server.Resources.Configuration.logging.json"; Stream resource = typeof(Program).Assembly.GetManifestResourceStream(ResourcePath) ?? throw new InvalidOperationException($"Invalid resource path: '{ResourcePath}'"); - Stream dst = new FileStream(configPath, FileMode.CreateNew, FileAccess.Write, FileShare.None, IODefaults.FileStreamBufferSize, FileOptions.Asynchronous); await using (resource.ConfigureAwait(false)) - await using (dst.ConfigureAwait(false)) { - // Copy the resource contents to the expected file path for the config file - await resource.CopyToAsync(dst).ConfigureAwait(false); + Stream dst = new FileStream(configPath, FileMode.CreateNew, FileAccess.Write, FileShare.None, IODefaults.FileStreamBufferSize, FileOptions.Asynchronous); + await using (dst.ConfigureAwait(false)) + { + // Copy the resource contents to the expected file path for the config file + await resource.CopyToAsync(dst).ConfigureAwait(false); + } } } |
