Skip to content

Commit

Permalink
Fix test "should detect safe-edit" on FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
tagattie committed Oct 19, 2024
1 parent 1bce197 commit 92c4a58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const pl = process.platform;
export const isWindows = pl === 'win32';
export const isMacos = pl === 'darwin';
export const isLinux = pl === 'linux';
export const isFreeBSD = pl === 'freebsd';
export const isIBMi = osType() === 'OS400';

export const EVENTS = {
Expand Down Expand Up @@ -433,7 +434,7 @@ export class NodeFsHandler {
if (!at || at <= mt || mt !== prevStats.mtimeMs) {
this.fsw._emit(EV.CHANGE, file, newStats);
}
if ((isMacos || isLinux) && prevStats.ino !== newStats.ino) {
if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats.ino) {
this.fsw._closeFile(path);
prevStats = newStats;
const closer = this._watchWithNodeFs(file, listener);
Expand Down

0 comments on commit 92c4a58

Please sign in to comment.