From f3893d16f31fba52e4df9780c09a0d1c140da102 Mon Sep 17 00:00:00 2001 From: ivar Date: Sun, 28 Apr 2024 22:32:31 +0200 Subject: Remove smells --- src/IOL.VippsEcommerce/Helpers.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/IOL.VippsEcommerce') diff --git a/src/IOL.VippsEcommerce/Helpers.cs b/src/IOL.VippsEcommerce/Helpers.cs index 7e61181..9f30da8 100644 --- a/src/IOL.VippsEcommerce/Helpers.cs +++ b/src/IOL.VippsEcommerce/Helpers.cs @@ -16,15 +16,15 @@ internal static class Helpers public static bool IsDirectoryWritable(this string dirPath, bool throwIfFails = false) { try { - using (var fs = File.Create(Path.Combine(dirPath, Path.GetRandomFileName()), - 1, - FileOptions.DeleteOnClose) - ) { } + using var _ = File.Create(Path.Combine(dirPath, Path.GetRandomFileName()), + 1, + FileOptions.DeleteOnClose); return true; } catch { - if (throwIfFails) + if (throwIfFails) { throw; + } return false; } -- cgit v1.3