aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Library/ItemResolveArgs.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2021-04-30 20:45:43 +0200
committerGitHub <noreply@github.com>2021-04-30 20:45:43 +0200
commit360d80c873c04a9f61ded160615f161bfcdb4f74 (patch)
treeda85c9fbedd816962494f14fe11a64f0856bf058 /MediaBrowser.Controller/Library/ItemResolveArgs.cs
parent13d09cbc473c51880a6b31653302eb72422234e7 (diff)
parentb323044139fd7a0b63a717101f7ccb7f03f3f125 (diff)
Merge pull request #5890 from Bond-009/filesystem
Reduce string allocations/fs lookups in resolve code
Diffstat (limited to 'MediaBrowser.Controller/Library/ItemResolveArgs.cs')
-rw-r--r--MediaBrowser.Controller/Library/ItemResolveArgs.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Library/ItemResolveArgs.cs b/MediaBrowser.Controller/Library/ItemResolveArgs.cs
index 12a311dc3..df8842237 100644
--- a/MediaBrowser.Controller/Library/ItemResolveArgs.cs
+++ b/MediaBrowser.Controller/Library/ItemResolveArgs.cs
@@ -60,10 +60,10 @@ namespace MediaBrowser.Controller.Library
public FileSystemMetadata FileInfo { get; set; }
/// <summary>
- /// Gets or sets the path.
+ /// Gets the path.
/// </summary>
/// <value>The path.</value>
- public string Path { get; set; }
+ public string Path => FileInfo.FullName;
/// <summary>
/// Gets a value indicating whether this instance is directory.
@@ -87,7 +87,7 @@ namespace MediaBrowser.Controller.Library
return false;
}
- var parentDir = System.IO.Path.GetDirectoryName(Path) ?? string.Empty;
+ var parentDir = FileInfo.DirectoryName ?? string.Empty;
return parentDir.Length > _appPaths.RootFolderPath.Length
&& parentDir.StartsWith(_appPaths.RootFolderPath, StringComparison.OrdinalIgnoreCase);