diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-29 09:12:29 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-29 09:12:29 -0500 |
| commit | 3488cfecbd54eaaf917d853664f68cac84d472e9 (patch) | |
| tree | a3f05e3f05e0441ae775b544d1b983a93ea49887 /MediaBrowser.Common.Implementations/BaseApplicationPaths.cs | |
| parent | e19766b1b7e4735e18ebb0e997579f7671cc267c (diff) | |
make lazy loaded paths more nimble
Diffstat (limited to 'MediaBrowser.Common.Implementations/BaseApplicationPaths.cs')
| -rw-r--r-- | MediaBrowser.Common.Implementations/BaseApplicationPaths.cs | 44 |
1 files changed, 4 insertions, 40 deletions
diff --git a/MediaBrowser.Common.Implementations/BaseApplicationPaths.cs b/MediaBrowser.Common.Implementations/BaseApplicationPaths.cs index eba8f5698..213942c9d 100644 --- a/MediaBrowser.Common.Implementations/BaseApplicationPaths.cs +++ b/MediaBrowser.Common.Implementations/BaseApplicationPaths.cs @@ -93,10 +93,6 @@ namespace MediaBrowser.Common.Implementations } /// <summary> - /// The _plugins path - /// </summary> - private string _pluginsPath; - /// <summary> /// Gets the path to the plugin directory /// </summary> /// <value>The plugins path.</value> @@ -104,21 +100,11 @@ namespace MediaBrowser.Common.Implementations { get { - if (_pluginsPath == null) - { - _pluginsPath = Path.Combine(ProgramDataPath, "plugins"); - Directory.CreateDirectory(_pluginsPath); - } - - return _pluginsPath; + return Path.Combine(ProgramDataPath, "plugins"); } } /// <summary> - /// The _plugin configurations path - /// </summary> - private string _pluginConfigurationsPath; - /// <summary> /// Gets the path to the plugin configurations directory /// </summary> /// <value>The plugin configurations path.</value> @@ -126,17 +112,10 @@ namespace MediaBrowser.Common.Implementations { get { - if (_pluginConfigurationsPath == null) - { - _pluginConfigurationsPath = Path.Combine(PluginsPath, "configurations"); - Directory.CreateDirectory(_pluginConfigurationsPath); - } - - return _pluginConfigurationsPath; + return Path.Combine(PluginsPath, "configurations"); } } - private string _tempUpdatePath; /// <summary> /// Gets the path to where temporary update files will be stored /// </summary> @@ -145,21 +124,11 @@ namespace MediaBrowser.Common.Implementations { get { - if (_tempUpdatePath == null) - { - _tempUpdatePath = Path.Combine(ProgramDataPath, "updates"); - Directory.CreateDirectory(_tempUpdatePath); - } - - return _tempUpdatePath; + return Path.Combine(ProgramDataPath, "updates"); } } /// <summary> - /// The _log directory path - /// </summary> - private string _logDirectoryPath; - /// <summary> /// Gets the path to the log directory /// </summary> /// <value>The log directory path.</value> @@ -167,12 +136,7 @@ namespace MediaBrowser.Common.Implementations { get { - if (_logDirectoryPath == null) - { - _logDirectoryPath = Path.Combine(ProgramDataPath, "logs"); - Directory.CreateDirectory(_logDirectoryPath); - } - return _logDirectoryPath; + return Path.Combine(ProgramDataPath, "logs"); } } |
