Skip to content

Commit

Permalink
Merge pull request #102 from julijane/master
Browse files Browse the repository at this point in the history
Fix for getDirectoryContents on Windows (Fixes issue #101)
  • Loading branch information
perry-mitchell authored Sep 11, 2018
2 parents a6b817e + 600b42a commit 516b466
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 516b466

Please sign in to comment.