Permalink
Browse files

fix: use platform agnostic approach to directory separators

Fix #164
  • Loading branch information...
jimlambie committed Dec 28, 2016
1 parent 66a8b39 commit d4e49b227bb95c8ac1db7a3c90618ee9e91a33ce
Showing with 2 additions and 2 deletions.
  1. +2 −2 dadi/lib/index.js
@@ -667,7 +667,7 @@ Server.prototype.updateCollections = function (collectionsPath) {

// parse the url out of the directory structure
var cpath = path.join(collectionsPath, collection)
var dirs = cpath.split('/')
var dirs = cpath.split(path.sep)
var version = dirs[dirs.length - 3]
var database = dirs[dirs.length - 2]

@@ -740,7 +740,7 @@ Server.prototype.updateEndpoints = function (endpointsPath) {
endpoints.forEach(function (endpoint) {
// parse the url out of the directory structure
var cpath = path.join(endpointsPath, endpoint)
var dirs = cpath.split('/')
var dirs = cpath.split(path.sep)
var version = dirs[dirs.length - 2]

self.addEndpointResource({

0 comments on commit d4e49b2

Please sign in to comment.