Permalink
Browse files
fix: use platform agnostic approach to directory separators
- Loading branch information...
Showing
with
2 additions
and
2 deletions.
-
+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