Closed bruce-one closed 3 years ago
While mucking around with this, I also found that the rename logic didn't work without swapping:
if (filename === undefined || filename !== this.filename) {
to
if (filename === undefined || filename === this.filename) {
this was on Linux, so not sure if this is acting differently to what you're seeing; but thought it might be worth mentioning too :-) (It would seem on Linux that the rename argument is the "from" filename, I guess?)
Thanks @bruce-one .
I'll merge the PR and double-check the rename
scenario.
The
|| true
meant this was always being set to true.Just if of use :-) (No stress at all if you want to implement this in a different way, just figured might as well create a pr rather than just an issue :-) )
(Was just trying with
new Tail("fileToTail", { follow: false })
, for context)