Permalink
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...
1 parent 2c251e6 commit 8f0d2a6438e9ba02cee2376011028d8e21c1d704 @tp tp committed Oct 29, 2013
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);

0 comments on commit 8f0d2a6

Please sign in to comment.