update file system methods
This commit is contained in:
@@ -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