Permalink
Browse files

fix rights parsing for list()

  • Loading branch information...
1 parent f9983c8 commit 99898319cdda8a17522723ce7311324283161a3d @mscdex committed Dec 18, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/ftp.js
View
@@ -981,9 +981,9 @@ function parseListEntry(line) {
name: undefined,
target: undefined,
rights: {
- user: ret.permission.substring(0, 3).replace('-', ''),
- group: ret.permission.substring(3, 6).replace('-', ''),
- other: ret.permission.substring(6, 9).replace('-', '')
+ user: ret.permission.substr(0, 3).replace(/\-/g, ''),
+ group: ret.permission.substr(3, 3).replace(/\-/g, ''),
+ other: ret.permission.substr(6, 3).replace(/\-/g, '')
},
owner: ret.owner,
group: ret.group,

0 comments on commit 9989831

Please sign in to comment.