From 58c4cd354ca8ba54eee5954e7ae5e5ae01f2c4b2 Mon Sep 17 00:00:00 2001 From: Steven Lizano Date: Mon, 29 Jul 2024 15:41:37 -0600 Subject: [PATCH] remove disposable object from method --- Snowflake.Data/Configuration/EasyLoggingConfigParser.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Snowflake.Data/Configuration/EasyLoggingConfigParser.cs b/Snowflake.Data/Configuration/EasyLoggingConfigParser.cs index 42278792c..582badd9d 100644 --- a/Snowflake.Data/Configuration/EasyLoggingConfigParser.cs +++ b/Snowflake.Data/Configuration/EasyLoggingConfigParser.cs @@ -55,14 +55,14 @@ private string TryToReadFile(string filePath) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { - using var streamReader = new StreamReader(filePath, Encoding.Default); + var streamReader = new StreamReader(filePath, Encoding.Default); return streamReader.ReadToEnd(); } else { var handle = VerifyUnixPermissions(filePath); - using var streamReader = new StreamReader(handle, Encoding.Default); + var streamReader = new StreamReader(handle, Encoding.Default); return streamReader.ReadToEnd(); } } @@ -79,7 +79,7 @@ private static UnixStream VerifyUnixPermissions(string filePath) FileAccessPermissions forbiddenPermissions = FileAccessPermissions.OtherWrite | FileAccessPermissions.GroupWrite; var fileInfo = new UnixFileInfo(path: filePath); - using var handle = fileInfo.OpenRead(); + var handle = fileInfo.OpenRead(); if (handle.OwnerUser.UserId != Syscall.geteuid()) throw new SnowflakeDbException(SFError.INTERNAL_ERROR, "Attempting to read a file not owned by the effective user of the current process"); if (handle.OwnerGroup.GroupId != Syscall.getegid())