aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/EnvironmentController.cs
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2020-11-16 19:47:36 +0000
committerGitHub <noreply@github.com>2020-11-16 19:47:36 +0000
commit2bbfcc264d5b8469f491f7dc2e54d852c1c1111e (patch)
tree00f15d3e4543a531bb5e6e0535fd43e683d1d6fd /Jellyfin.Api/Controllers/EnvironmentController.cs
parent4bfcc8b0d15a76d9d33e038cc4e5590fc1016750 (diff)
parentdc0e353b968e80b9532638f5a752f89572566d82 (diff)
Merge branch 'master' into emby-namig-nullable
Diffstat (limited to 'Jellyfin.Api/Controllers/EnvironmentController.cs')
-rw-r--r--Jellyfin.Api/Controllers/EnvironmentController.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/EnvironmentController.cs b/Jellyfin.Api/Controllers/EnvironmentController.cs
index ce88b0b99..6dd536254 100644
--- a/Jellyfin.Api/Controllers/EnvironmentController.cs
+++ b/Jellyfin.Api/Controllers/EnvironmentController.cs
@@ -5,6 +5,7 @@ using System.IO;
using System.Linq;
using Jellyfin.Api.Constants;
using Jellyfin.Api.Models.EnvironmentDtos;
+using MediaBrowser.Common.Extensions;
using MediaBrowser.Model.IO;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
@@ -103,6 +104,11 @@ namespace Jellyfin.Api.Controllers
if (validatePathDto.ValidateWritable)
{
+ if (validatePathDto.Path == null)
+ {
+ throw new ResourceNotFoundException(nameof(validatePathDto.Path));
+ }
+
var file = Path.Combine(validatePathDto.Path, Guid.NewGuid().ToString());
try
{