Permalink
Browse files

fix: use platform agnostic path separator

  • Loading branch information...
jimlambie committed Dec 28, 2016
1 parent 8bfe0e9 commit cfec695b3592f34385b12bf9bf7ccc46824a4499
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 cfec695

Please sign in to comment.