mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
1 attempted fix
This commit is contained in:
parent
e5828cdbf1
commit
21d15989f5
@ -203,10 +203,10 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
|||||||
var directory = Path.GetDirectoryName(path) ?? throw new ArgumentException($"Provided path ({path}) is not valid.", nameof(path));
|
var directory = Path.GetDirectoryName(path) ?? throw new ArgumentException($"Provided path ({path}) is not valid.", nameof(path));
|
||||||
Directory.CreateDirectory(directory);
|
Directory.CreateDirectory(directory);
|
||||||
|
|
||||||
// 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);
|
FileSystem.SetAttributes(path, false, false);
|
||||||
|
|
||||||
using (var filestream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read))
|
using (var filestream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.None))
|
||||||
{
|
{
|
||||||
stream.CopyTo(filestream);
|
stream.CopyTo(filestream);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user