Skip to content

Commit

Permalink
ensure file closure
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelch-r7 committed Dec 5, 2023
1 parent 92dc5c7 commit c3b055f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ruby_smb/smb2/tree.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ def list(directory: nil, pattern: '*', type: RubySMB::Fscc::FileInformation::Fil
# Reset the message id so the client can update appropriately.
directory_request.smb2_header.message_id = 0
end
opened_directory.close
files
ensure
opened_directory.close
end

# 'Opens' a directory file on the remote end, using a CreateRequest. This
Expand Down

0 comments on commit c3b055f

Please sign in to comment.