Skip to content

Commit ec76b20

Browse files
committed
fix: init ignorer on every run
1 parent f050def commit ec76b20

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@filen/sync",
3-
"version": "0.1.100",
3+
"version": "0.1.101",
44
"description": "Filen Sync",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/ignorer.ts

-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export class Ignorer {
1111
private sync: Sync
1212
public instance = ignore()
1313
public name: string = "ignorer"
14-
public pattern: string[] = []
1514
private readonly mutex = new Semaphore(1)
1615

1716
public constructor(sync: Sync, name: string = "ignorer") {
@@ -114,7 +113,6 @@ export class Ignorer {
114113
.filter(line => line.length > 0)
115114
}
116115

117-
this.pattern = content
118116
this.instance = ignore()
119117

120118
if (content.length > 0) {

src/lib/sync.ts

+3
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ export class Sync {
367367
})
368368
}, 1000)
369369

370+
// Init the ignorer on every run. We might have changes in the physical .filenignore file
371+
await this.ignorer.initialize()
372+
370373
// eslint-disable-next-line prefer-const
371374
let [currentLocalTree, currentRemoteTree] = await Promise.all([
372375
this.localFileSystem.getDirectoryTree(),

0 commit comments

Comments
 (0)