Allow recursive watching of folders
This commit is contained in:
parent
75cf4b5d37
commit
363fa300c2
2 changed files with 7 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bitburner-filesync",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.2",
|
||||
"description": "Official implementation of the Bitburner Filesync server",
|
||||
"type": "module",
|
||||
"bin": "./npx/bitburner-filesync.js",
|
||||
|
@ -19,6 +19,7 @@
|
|||
"remote"
|
||||
],
|
||||
"license": "Unlicense",
|
||||
"author": "Zoë Hoekstra",
|
||||
"bugs": {
|
||||
"url": "https://github.com/bitburner-official/bitburner-filesync/issues"
|
||||
},
|
||||
|
|
|
@ -3,9 +3,12 @@ import {config} from "./config.js";
|
|||
import {EventType} from "./eventTypes.js";
|
||||
import {resolve } from "path";
|
||||
|
||||
function fileFilter(event) {
|
||||
if(config.get("allowedFiletypes").some(extension => event.path.endsWith(extension)))
|
||||
function fileFilter(file) {
|
||||
if(config.get("allowedFiletypes").some(extension => file.path.endsWith(extension)))
|
||||
return true;
|
||||
if(file.stats.isDirectory())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
export async function setupWatch(signaller) {
|
||||
|
|
Loading…
Add table
Reference in a new issue