We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7200a7a commit a439c21Copy full SHA for a439c21
lib/filewatch/sincedb_collection.rb
@@ -85,6 +85,12 @@ def associate(watched_file)
85
logger.trace? && logger.trace("associate: inode and path matched", :filename => watched_file.filename)
86
return true
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 name", :filename => watched_file.filename)
92
+ return true
93
+ end
94
# the path on disk is different from discovered unassociated path but they have the same key (inode)
95
# treat as a new file, a new value will be added when the file is opened
96
sincedb_value.clear_watched_file
0 commit comments