# HG changeset patch # User Emmanuel Gil Peyrot # Date 1288599534 -3600 # Node ID e007a6364bf0900f5e849e69b474672792c544cc # Parent 7cfcd7d5796c6a2bb007175f7dd65e3b80adbe42 Fix an error when loading file/directory. diff --git a/backends/directory.js b/backends/directory.js --- a/backends/directory.js +++ b/backends/directory.js @@ -18,6 +18,7 @@ */ var fs = require('fs'); +var Node = require('../nodes').Node; var backend = exports; backend.save = function(dir) { diff --git a/backends/file.js b/backends/file.js --- a/backends/file.js +++ b/backends/file.js @@ -18,6 +18,7 @@ */ var fs = require('fs'); +var Node = require('../nodes').Node; var backend = exports; backend.save = function(file) { diff --git a/iso8601.js b/iso8601.js --- a/iso8601.js +++ b/iso8601.js @@ -18,11 +18,11 @@ */ Date.prototype.setFromISO8601 = function(iso){ - var format = /(\d\{4\})(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)Z/; + var format = /(\d{4})(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)Z/; var m = iso.match(format); this.setUTCDate(1); - this.setUTCFullYear(parseInt(m[1],10)); + this.setUTCFullYear(parseInt(m[1])); this.setUTCMonth(parseInt(m[3],10) - 1); this.setUTCDate(parseInt(m[5],10)); this.setUTCHours(parseInt(m[7],10));