aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2025-05-04 16:40:34 +0200
committerGitHub <noreply@github.com>2025-05-04 08:40:34 -0600
commit0c3ba30de214eddcd6118c3b695b08e5482bf7ed (patch)
treea862a90f6c78cd61f78e5af7b75611a37f527ccf /Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
parent4096c973c623a72525843d5fe278d1f36fbbc58a (diff)
Cleanup file related code (#14023)
Diffstat (limited to 'Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs')
-rw-r--r--Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
index d1376f18a..18ebd628d 100644
--- a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
+++ b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using Jellyfin.Extensions;
using MediaBrowser.Common.Configuration;
namespace Emby.Server.Implementations.AppBase
@@ -91,10 +92,7 @@ namespace Emby.Server.Implementations.AppBase
/// <inheritdoc />
public void CreateAndCheckMarker(string path, string markerName, bool recursive = false)
{
- if (!Directory.Exists(path))
- {
- Directory.CreateDirectory(path);
- }
+ Directory.CreateDirectory(path);
CheckOrCreateMarker(path, $".jellyfin-{markerName}", recursive);
}
@@ -115,7 +113,7 @@ namespace Emby.Server.Implementations.AppBase
var markerPath = Path.Combine(path, markerName);
if (!File.Exists(markerPath))
{
- File.Create(markerPath).Dispose();
+ FileHelper.CreateEmpty(markerPath);
}
}
}