mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	| @@ -31,7 +31,7 @@ module.exports = function(RED) { | ||||
|         this.p = (this.files.length === 1) ? this.files[0] : JSON.stringify(this.files); | ||||
|         const node = this; | ||||
|  | ||||
|         const watcher = watch(this.files, { recursive: true }); | ||||
|         const watcher = watch(this.files, { recursive: this.recursive }); | ||||
|  | ||||
|         watcher.on('change', function (event, fpath) { | ||||
|             const file = path.basename(fpath) | ||||
| @@ -53,13 +53,7 @@ module.exports = function(RED) { | ||||
|                 else if (stat.isCharacterDevice()) { type = "characterdevice"; } | ||||
|                 else if (stat.isSocket()) { type = "socket"; } | ||||
|                 else if (stat.isFIFO()) { type = "fifo"; } | ||||
|                 else if (stat.isDirectory()) { | ||||
|                     type = "directory"; | ||||
|                     if (node.recursive) { | ||||
|                         notifications.add([fpath]); | ||||
|                         notifications.add(getAllDirs(fpath)); | ||||
|                     } | ||||
|                 } | ||||
|                 else if (stat.isDirectory()) { type = "directory"; } | ||||
|                 else { type = "n/a"; } | ||||
|             } | ||||
|             msg.type = type; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user