Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix connection.js for use in strict mode

When running node with `--use_strict` one gets this error:

```
node_modules/ftp/lib/connection.js:650
      function nextDir() {
      ^^^^^^^^
SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function.
```
  • Loading branch information...
commit 8f0d2a6438e9ba02cee2376011028d8e21c1d704 1 parent 2c251e6
@tp tp authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/connection.js
View
2  lib/connection.js
@@ -667,7 +667,7 @@ FTP.prototype.mkdir = function(path, recursive, cb) { // MKD is optional
if (path.indexOf('/') === -1)
this._send('MKD ' + path, cb);
else {
- function nextDir() {
+ var nextDir = function() {
if (++i === dirslen) {
// return to original working directory
return self._send('CWD ' + owd, cb, true);
Please sign in to comment.
Something went wrong with that request. Please try again.