aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2021-05-20 21:28:18 +0200
committerBond_009 <bond.009@outlook.com>2021-05-20 22:48:53 +0200
commit7e8428e588b3f0a0574da44081098c64fe1a47d7 (patch)
tree4dd11afc9e5b38d46366a9fea207e1dbb82a3e56 /Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
parente8790bfa963284863dc1126a83df72309ec30561 (diff)
Enable nullable reference types for Emby.Server.Implementations
Diffstat (limited to 'Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs')
-rw-r--r--Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs8
1 files changed, 2 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
index 660bbb2de..6edfad575 100644
--- a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
+++ b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs
@@ -33,7 +33,7 @@ namespace Emby.Server.Implementations.AppBase
CachePath = cacheDirectoryPath;
WebPath = webDirectoryPath;
- DataPath = Path.Combine(ProgramDataPath, "data");
+ _dataPath = Directory.CreateDirectory(Path.Combine(ProgramDataPath, "data")).FullName;
}
/// <summary>
@@ -55,11 +55,7 @@ namespace Emby.Server.Implementations.AppBase
/// Gets the folder path to the data directory.
/// </summary>
/// <value>The data directory.</value>
- public string DataPath
- {
- get => _dataPath;
- private set => _dataPath = Directory.CreateDirectory(value).FullName;
- }
+ public string DataPath => _dataPath;
/// <inheritdoc />
public string VirtualDataPath => "%AppDataPath%";