Skip to content

Commit

Permalink
Fix for paths on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
julijane committed Sep 11, 2018
1 parent a6b817e commit 600b42a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/interface/directoryContents.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
})
);
Expand Down

0 comments on commit 600b42a

Please sign in to comment.