Permalink
Browse files

Make directories absolute

  • Loading branch information...
1 parent 04977d7 commit 55bd75f47f2c0160ccffe398d28595fbe36d9b66 @pvorb committed Feb 17, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 bread.js
View
@@ -6,6 +6,7 @@ var mongo = require('mongodb');
var append = require('append');
var clone = require('clone');
var Set = require('Set');
+var path = require('path');
var write = require('./write.js');
@@ -16,6 +17,9 @@ var x = function () {};
var bread = function(conf, cb) {
var dir = conf.directories;
+ for (var key in dir) {
+ dir[key] = path.resolve(conf.root, dir[key]);
+ }
// Open connection to MongoDB
new mongo.Db(conf.db.name, new mongo.Server(conf.db.host, conf.db.port))

0 comments on commit 55bd75f

Please sign in to comment.