mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-31 21:08:27 +01:00
Updated based on review feedback
This commit is contained in:
@@ -128,7 +128,7 @@ namespace MediaBrowser.LocalMetadata.Savers
|
||||
|
||||
private void SaveToFile(Stream stream, string path)
|
||||
{
|
||||
var directory = Path.GetDirectoryName(path) ?? throw new ResourceNotFoundException(nameof(path));
|
||||
var directory = Path.GetDirectoryName(path) ?? throw new ArgumentException($"Provided path ({path}) is not valid.", nameof(path));
|
||||
Directory.CreateDirectory(directory);
|
||||
// On Windows, savint the file will fail if the file is hidden or readonly
|
||||
FileSystem.SetAttributes(path, false, false);
|
||||
|
||||
Reference in New Issue
Block a user