Skip to content

Commit

Permalink
parse file sizes as JS numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
mscdex committed Dec 16, 2012
1 parent 80c83e5 commit f7ec139
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ftp.js
Expand Up @@ -591,7 +591,7 @@ function parseListEntry(line) {
},
owner: ret.owner,
group: ret.group,
size: ret.size,
size: parseInt(ret.size, 10),
date: undefined
};
if (ret.month1 !== undefined) {
Expand Down Expand Up @@ -631,7 +631,7 @@ function parseListEntry(line) {
info = {
name: ret.name,
type: (ret.isdir ? 'd' : '-'),
size: (ret.isdir ? '0' : ret.size),
size: (ret.isdir ? 0 : parseInt(ret.size, 10)),
date: undefined,
};
month = parseInt(ret.month, 10),
Expand Down

0 comments on commit f7ec139

Please sign in to comment.