Skip to content

Commit

Permalink
README: slice should account for len given (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens authored and mafintosh committed Mar 5, 2017
1 parent db48a52 commit 5fa4376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ fuse.mount('./mnt', {
},
read: function (path, fd, buf, len, pos, cb) {
console.log('read(%s, %d, %d, %d)', path, fd, len, pos)
var str = 'hello world\n'.slice(pos)
var str = 'hello world\n'.slice(pos, pos + len)
if (!str) return cb(0)
buf.write(str)
return cb(str.length)
Expand Down

0 comments on commit 5fa4376

Please sign in to comment.