Commit 11efffd4 authored by Remy Suen's avatar Remy Suen

Fix #1339 Force backslashes with path.posix

Index's addByPath function does not accept backslashes. To ensure
that forward slashes are used, path.posix is used to join paths
together with a forward slash in a platform independent way.
Signed-off-by: default avatarRemy Suen <remy.suen@gmail.com>
parent 113493a9
......@@ -46,7 +46,7 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git"))
})
.then(function() {
// this file is in a subdirectory and can use a relative path
return index.addByPath(path.join(directoryName, fileName));
return index.addByPath(path.posix.join(directoryName, fileName));
})
.then(function() {
// this will write both files to the index
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment