File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,12 @@ def associate(watched_file)
85
85
logger . trace? && logger . trace ( "associate: inode and path matched" , :filename => watched_file . filename )
86
86
return true
87
87
end
88
+ if watched_file . path . start_with? ( sincedb_value . path_in_sincedb )
89
+ # If the path starts with sincedb path, it is considered a rotated file.
90
+ handle_association ( sincedb_value , watched_file )
91
+ logger . trace? && logger . trace ( "associate: matched but start with same path" , :filename => watched_file . filename )
92
+ return true
93
+ end
88
94
# the path on disk is different from discovered unassociated path but they have the same key (inode)
89
95
# treat as a new file, a new value will be added when the file is opened
90
96
sincedb_value . clear_watched_file
You can’t perform that action at this time.
0 commit comments