Skip to content

Commit

Permalink
Merge pull request #1375 from tagattie/freebsd-fix
Browse files Browse the repository at this point in the history
Fix test "should detect safe-edit" on FreeBSD
  • Loading branch information
paulmillr authored Oct 19, 2024
2 parents 1bce197 + 92c4a58 commit 97894d3
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 97894d3

Please sign in to comment.