diff options
| author | Luke <luke.pulverenti@gmail.com> | 2015-09-13 17:32:02 -0400 |
|---|---|---|
| committer | Luke <luke.pulverenti@gmail.com> | 2015-09-13 17:32:02 -0400 |
| commit | 14de062681026157c6917779a51af6fb7046cec2 (patch) | |
| tree | fe72ade31e1ef3874e0ed71684fe8ed819e43cc0 /MediaBrowser.Common.Implementations/Security/MBLicenseFile.cs | |
| parent | 0f743205c4835d828de9f28f6ab7d325209e83b2 (diff) | |
update file system methods
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); } } } |
