From ed0be1db28e9e2812cd84a0bb99e9d18a154cce8 Mon Sep 17 00:00:00 2001
From: Jake Read <jake.read@cba.mit.edu>
Date: Fri, 11 Oct 2019 16:05:57 -0400
Subject: [PATCH] try more err correcting for filesys, and fix error in
 template

---
 README.md  |  4 ++--
 filesys.js | 18 +++++++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/README.md b/README.md
index 5ded16a..1d95e90 100644
--- a/README.md
+++ b/README.md
@@ -108,7 +108,7 @@ function Name() {
     // making sure we are clear to run,
     if (inA.io() && !outB.io()) {
       // an input is occupied, and the exit path is empty
-      let output = internalFunc(this.inputs.a.get())
+      let output = internalFunc(inA.get())
       // put 'er there
       outB.put(output)
     }
@@ -201,6 +201,6 @@ You can now run Cuttlefish by doing:
 
 ``node cf``
 
-It should then report an IP and port. One is your local address, if the browser you are using is on the same machine as the node process, and the other is the machine's outward facing IP. You should be able to point the browser to one of these IPs, and you're off and cuttling. 
+It should then report an IP and port. One is your local address, if the browser you are using is on the same machine as the node process, and the other is the machine's outward facing IP. You should be able to point the browser to one of these IPs, and you're off and cuttling.
 
 ...
diff --git a/filesys.js b/filesys.js
index c765859..c4f9dfd 100644
--- a/filesys.js
+++ b/filesys.js
@@ -14,23 +14,23 @@ module.exports = {
       let count = 0
       // recursor,
       let launch = (dir) => {
-        if(debug) console.log('GDT launch at', dir)
+        if (debug) console.log('GDT launch at', dir)
         // just counting actually,
-        count ++
+        count++
         fs.readdir(dir, (err, files) => {
-          if(err){
+          if (err) {
             reject(err)
           }
-          count --
-          try{
+          count--
+          try {
             for (file of files) {
               if (file.includes('.')) {
                 let listAddition = `${dir.substring(__dirname.length + tld.length)}/${file}`
-                if(debug) console.log('GDT pushing', listAddition)
+                if (debug) console.log('GDT pushing', listAddition)
                 list.push(listAddition)
               } else {
                 let launchPoint = `${dir}${file}`
-                if(debug) console.log('GDT launching', launchPoint)
+                if (debug) console.log('GDT launching', launchPoint)
                 launch(launchPoint)
               }
             }
@@ -42,8 +42,8 @@ module.exports = {
             list.sort()
             resolve(list)
           }
-          if(debug) console.log('GDT size', count)
-          if(!count){
+          if (debug) console.log('GDT size', count)
+          if (!count) {
             // we sort,
             list.sort()
             console.log('list at fin getDirTree', list)
-- 
GitLab