mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-17 19:54:47 +01:00
update file system methods
This commit is contained in:
@@ -90,8 +90,8 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
File.WriteAllText(path, address, Encoding.UTF8);
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
_fileSystem.WriteAllText(path, address, Encoding.UTF8);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -105,7 +105,7 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
|
||||
try
|
||||
{
|
||||
var endpoint = File.ReadAllText(path, Encoding.UTF8);
|
||||
var endpoint = _fileSystem.ReadAllText(path, Encoding.UTF8);
|
||||
|
||||
if (IsValid(endpoint))
|
||||
{
|
||||
|
||||
@@ -315,7 +315,7 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
var json = _json.SerializeToString(_data);
|
||||
|
||||
@@ -323,7 +323,7 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
|
||||
lock (_dataFileLock)
|
||||
{
|
||||
File.WriteAllText(path, encrypted, Encoding.UTF8);
|
||||
_fileSystem.WriteAllText(path, encrypted, Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -340,7 +340,7 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
{
|
||||
lock (_dataFileLock)
|
||||
{
|
||||
var encrypted = File.ReadAllText(path, Encoding.UTF8);
|
||||
var encrypted = _fileSystem.ReadAllText(path, Encoding.UTF8);
|
||||
|
||||
var json = _encryption.DecryptString(encrypted);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user