Skip to content

Commit 97894d3

Browse files
authored
Merge pull request #1375 from tagattie/freebsd-fix
Fix test "should detect safe-edit" on FreeBSD
2 parents 1bce197 + 92c4a58 commit 97894d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/handler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const pl = process.platform;
1818
export const isWindows = pl === 'win32';
1919
export const isMacos = pl === 'darwin';
2020
export const isLinux = pl === 'linux';
21+
export const isFreeBSD = pl === 'freebsd';
2122
export const isIBMi = osType() === 'OS400';
2223

2324
export const EVENTS = {
@@ -433,7 +434,7 @@ export class NodeFsHandler {
433434
if (!at || at <= mt || mt !== prevStats.mtimeMs) {
434435
this.fsw._emit(EV.CHANGE, file, newStats);
435436
}
436-
if ((isMacos || isLinux) && prevStats.ino !== newStats.ino) {
437+
if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats.ino) {
437438
this.fsw._closeFile(path);
438439
prevStats = newStats;
439440
const closer = this._watchWithNodeFs(file, listener);

0 commit comments

Comments
 (0)