JSDOC/Options.js
[gnome.introspection-doc-generator] / JSDOC / Options.js
index 0666ec4..d68d34f 100644 (file)
@@ -114,16 +114,19 @@ Options = {
         }
         // append full path to source directories.
         var _this= this;
-        this.src.forEach(function(v, i) {
-            if (!v.lenght || v[0] != '/') {
-                _this.src[i] = _this.baseDir + '/' + v;
+        var src = this.src;
+        this.src = [];
+        src.forEach(function(v, i) {
+            if (!v.length || v[0] != '/') {
+                v = _this.baseDir + (v.length ?  '/' + v : '');
             }
-            if (File.isDirectory(_this.src[i])) {
+            if (!File.isDirectory(v)) {
                 throw {
                     name: "ArgumentError", 
                     message: "invalid Source Directory : " +  v
                 };
             }
+            this.src.push(v);
         });