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)
8585 logger . trace? && logger . trace ( "associate: inode and path matched" , :filename => watched_file . filename )
8686 return true
8787 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
8894 # the path on disk is different from discovered unassociated path but they have the same key (inode)
8995 # treat as a new file, a new value will be added when the file is opened
9096 sincedb_value . clear_watched_file
You can’t perform that action at this time.
0 commit comments