From 600b42a031203723f9265d3072c565ab586f433e Mon Sep 17 00:00:00 2001 From: Juliane Holzt Date: Tue, 11 Sep 2018 02:04:16 +0200 Subject: [PATCH] Fix for paths on Windows --- source/interface/directoryContents.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/interface/directoryContents.js b/source/interface/directoryContents.js index fe9f409a..8982a532 100644 --- a/source/interface/directoryContents.js +++ b/source/interface/directoryContents.js @@ -42,7 +42,7 @@ function getDirectoryContents(remotePathRaw, options) { } function getDirectoryFiles(result, serverBasePath, requestPath) { - const remoteTargetPath = path.join(serverBasePath, requestPath); + const remoteTargetPath = path.posix.join(serverBasePath, requestPath); // Extract the response items (directory contents) const multiStatus = getValueForKey("multistatus", result); const responseItems = getValueForKey("response", multiStatus); @@ -67,7 +67,7 @@ function getDirectoryFiles(result, serverBasePath, requestPath) { const filename = serverBasePath === "/" ? urlTools.normalisePath(href) - : urlTools.normalisePath(path.relative(serverBasePath, href)); + : urlTools.normalisePath(path.posix.relative(serverBasePath, href)); return davTools.propsToStat(props, filename); }) );