mirror of
https://github.com/jellyfin/jellyfin
synced 2024-10-01 13:34:26 +00:00
Merge pull request #5106 from BaronGreenback/FileShareTest2
(cherry picked from commit 28ffbf6945
)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
a934477850
commit
d816995d27
|
@ -202,10 +202,11 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
|||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
// On Windows, savint the file will fail if the file is hidden or readonly
|
||||
// On Windows, saving the file will fail if the file is hidden or readonly
|
||||
FileSystem.SetAttributes(path, false, false);
|
||||
|
||||
using (var filestream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read))
|
||||
// use FileShare.None as this bypasses dotnet bug dotnet/runtime#42790 .
|
||||
using (var filestream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.None))
|
||||
{
|
||||
stream.CopyTo(filestream);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue