diff options
Diffstat (limited to 'MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs')
| -rw-r--r-- | MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs b/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs index 63381efcd..e5cf5856e 100644 --- a/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs +++ b/MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs @@ -99,15 +99,15 @@ namespace MediaBrowser.Common.Implementations.Security { try { - contents = File.ReadAllLines(licenseFile); + contents = _fileSystem.ReadAllLines(licenseFile); } catch (DirectoryNotFoundException) { - (File.Create(licenseFile)).Close(); + (_fileSystem.CreateFile(licenseFile)).Close(); } catch (FileNotFoundException) { - (File.Create(licenseFile)).Close(); + (_fileSystem.CreateFile(licenseFile)).Close(); } } if (contents != null && contents.Length > 0) @@ -150,8 +150,8 @@ namespace MediaBrowser.Common.Implementations.Security } var licenseFile = Filename; - Directory.CreateDirectory(Path.GetDirectoryName(licenseFile)); - lock (_fileLock) File.WriteAllLines(licenseFile, lines); + _fileSystem.CreateDirectory(Path.GetDirectoryName(licenseFile)); + lock (_fileLock) _fileSystem.WriteAllLines(licenseFile, lines); } } } |
