diff options
Diffstat (limited to 'src/IOL.VippsEcommerce')
| -rw-r--r-- | src/IOL.VippsEcommerce/Helpers.cs | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |
