Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

fs.watchFile regression in 0.12 #25345

@kanongil

Description

@kanongil

When fs.watchFile(path, callback) is called on an non-existing file, the 0.12 behavior is different than 0.10.

In 0.10.38, the callback is never called.

In 0.12.2, the callback is called immediately with this object as curr and prev:

{ dev: 0,
  mode: 0,
  nlink: 0,
  uid: 0,
  gid: 0,
  rdev: 0,
  blksize: 0,
  ino: 0,
  size: 0,
  blocks: 0,
  atime: Thu Jan 01 1970 01:00:00 GMT+0100 (CET),
  mtime: Thu Jan 01 1970 01:00:00 GMT+0100 (CET),
  ctime: Thu Jan 01 1970 01:00:00 GMT+0100 (CET),
  birthtime: Thu Jan 01 1970 01:00:00 GMT+0100 (CET) }

This new behavior breaks one of my scripts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions