We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c83b259 commit e4ce1b9Copy full SHA for e4ce1b9
lib/filewatch/read_mode/handlers/read_file.rb
@@ -4,8 +4,9 @@ module FileWatch module ReadMode module Handlers
4
class ReadFile < Base
5
def handle_specifically(watched_file)
6
if open_file(watched_file)
7
- add_or_update_sincedb_collection(watched_file)
8
- watched_file.file_seek(watched_file.bytes_read)
+ add_or_update_sincedb_collection(watched_file) unless sincedb_collection.member?(watched_file.sincedb_key)
+ previous_pos = sincedb_collection.find(watched_file).position
9
+ watched_file.file_seek([watched_file.bytes_read, previous_pos].max)
10
loop do
11
break if quit?
12
loop_control = watched_file.loop_control_adjusted_for_stat_size
0 commit comments