From e02b1bc5b1ffdd163b6b3c0c7eb95fda8dc07d94 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Mon, 4 May 2020 05:18:18 +0000
Subject: [PATCH] Resolve the File.open() warning about the use of 'e'. Don't
 include the target link in the Seenby's included in the generated .tic file.

---
 exec/hatchit.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/exec/hatchit.js b/exec/hatchit.js
index 536576f95d..b3c0bac439 100644
--- a/exec/hatchit.js
+++ b/exec/hatchit.js
@@ -258,15 +258,17 @@ function hatch_file(file, area, origin)
 		tf.printf('Crc %08lX\r\n', file_crc(file.path));
 		for (i=0; i<tic.path.length; i++)
 			tf.write('Path '+tic.path[i]+'\r\n');
-		for (i=0; i<tic.seenby.length; i++)
-			tf.write('Seenby '+tic.seenby[i]+'\r\n');
+		for (i=0; i<tic.seenby.length; i++) {
+			if(tic.seenby[i] != link)
+				tf.write('Seenby '+tic.seenby[i]+'\r\n');
+		}
 		tf.write('Pw '+pw+'\r\n');
 		tf.close();
 
 		// Create bsy file...
 		flobase = outb+format("%04x%04x", addr.net, addr.node);
 		bf = new File(flobase+'.bsy');
-		while (!bf.open('web+')) {
+		while (!bf.open('wxb+')) {
 			// TODO: This waits forever...
 			log(LOG_WARNING, "Waiting for BSY file '"+bf.name+"'...");
 			mswait(1000);
-- 
GitLab