diff options
| author | ivar <i@oiee.no> | 2024-04-28 22:32:31 +0200 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2024-04-28 22:32:31 +0200 |
| commit | f3893d16f31fba52e4df9780c09a0d1c140da102 (patch) | |
| tree | 0116eab37b7d2cce6f352bbd7a16d2ce0b22b596 /src/IOL.VippsEcommerce/Helpers.cs | |
| parent | 2cdb9549dda574fc91f44aecefe6c4620257f050 (diff) | |
| download | dotnet-vipps-ecommerce-master.tar.xz dotnet-vipps-ecommerce-master.zip | |
Diffstat (limited to 'src/IOL.VippsEcommerce/Helpers.cs')
| -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; } |
