Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
icetee committed Aug 23, 2018
2 parents e8a7b2f + 0d4aed4 commit 795d9a2
Show file tree
Hide file tree
Showing 5 changed files with 277 additions and 38 deletions.
6 changes: 3 additions & 3 deletions lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const /* TYPE = {
552: 'Requested file action aborted / Exceeded storage allocation (for current directory or dataset)',
553: 'Requested action not taken / File name not allowed'
},*/
bytesNOOP = new Buffer('NOOP\r\n');
bytesNOOP = Buffer.from('NOOP\r\n');

var FTP = module.exports = function() {
if (!(this instanceof FTP))
Expand Down Expand Up @@ -380,8 +380,8 @@ FTP.prototype.setLastMod = function(path, date, cb) {
('00' + date.getUTCHours()).slice(-2) +
('00' + date.getUTCMinutes()).slice(-2) +
('00' + date.getUTCSeconds()).slice(-2);
this._send('MFMT ' + dateStr + ' ' + path, cb);

this._send('MFMT ' + dateStr + ' ' + path, cb);
}

FTP.prototype.site = function(cmd, cb) {
Expand Down
4 changes: 2 additions & 2 deletions lib/expressions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const XRegExp = require('xregexp');
const REX_LISTUNIX = XRegExp(`
^(?<type>[bcdelfmpSs-])
(?<permission>((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-])))
(?<acl>(\\+))?\\s+
(?<acl>([\\+|@]))?\\s+
(?<inodes>\\d+)\\s+
(?<owner>\\d+|[A-Z]{1}\\w+\\s+[A-Z]{1}\\w+|\\w+|\\S+)\\s+
(?<group>\\d+|[A-Z]{1}\\w+\\s+[A-Z]{1}\\w+|\\w+|\\S+)\\s+
Expand Down Expand Up @@ -71,7 +71,7 @@ const RETVAL = {
ERR_PERM: 5,
};

const bytesNOOP = new Buffer('NOOP\r\n');
const bytesNOOP = Buffer.from('NOOP\r\n');

module.exports = {
REX_LISTUNIX,
Expand Down
4 changes: 3 additions & 1 deletion lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ class Parser extends EventEmitter {
hour = parseInt(retMsdos.hour, 10);
mins = parseInt(retMsdos.minute, 10);

year += (year < 70) ? 2000 : 1900;
if (year.toString().length < 4) {
year += (year < 70) ? 2000 : 1900;
}

if (retMsdos.ampm[0].toLowerCase() === 'p' && hour < 12) {
hour += 12;
Expand Down
Loading

0 comments on commit 795d9a2

Please sign in to comment.