Skip to content

Commit

Permalink
Fixing the issue with deletion of temp file along with the dynamic pr…
Browse files Browse the repository at this point in the history
…efix changes
  • Loading branch information
nigoel authored and elyscape committed Oct 28, 2015
1 parent 95bf768 commit b6d430d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/logstash/outputs/s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,13 @@ def reset_page_counter(key)
private
def delete_on_bucket(filename)
bucket = @s3.buckets[@bucket]

first = Pathname.new @temporary_directory
second = Pathname.new filename

remote_filename = "#{@prefix}#{File.basename(filename)}"
remote_filename_path = second.relative_path_from first

remote_filename = remote_filename_path.to_s

@logger.debug("S3: delete file from bucket", :remote_filename => remote_filename, :bucket => @bucket)

Expand Down

0 comments on commit b6d430d

Please sign in to comment.