aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2021-09-11 13:32:59 +0200
committercvium <clausvium@gmail.com>2021-09-11 13:32:59 +0200
commit794b73c62d7f9e5a962dc6031e7772c1a644aae9 (patch)
treea9bc9740a904bd380880e5100a34d30d76310a4b
parent3bc9f388339bd1266a6a31e93dac81817da1b312 (diff)
Use File.GetAttributes instead of creating a new FileInfo
-rw-r--r--Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs6
1 files changed, 1 insertions, 5 deletions
diff --git a/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs b/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs
index 401b3bb84..93bd2c1ba 100644
--- a/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs
+++ b/Jellyfin.Server/Infrastructure/SymlinkFollowingPhysicalFileResultExecutor.cs
@@ -140,10 +140,6 @@ namespace Jellyfin.Server.Infrastructure
.ConfigureAwait(true);
}
- private static bool IsSymLink(string path)
- {
- var fileInfo = new FileInfo(path);
- return (fileInfo.Attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint;
- }
+ private static bool IsSymLink(string path) => (File.GetAttributes(path) & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint;
}
}