Skip to content

Commit

Permalink
Adding support of domain name
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi Borgniet committed Sep 1, 2016
1 parent 7dffe47 commit b39bbce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function SambaClient(options) {
this.address = options.address;
this.username = wrap(options.username || 'guest');
this.password = options.password ? wrap(options.password) : undefined;
this.domain = options.domain;
}

SambaClient.prototype.getFile = function(path, destination, cb) {
Expand Down Expand Up @@ -84,6 +85,11 @@ SambaClient.prototype.getSmbClientArgs = function(fullCmd) {
args.push(this.password);
}

if (this.domain) {
args.push('-W');
args.push(this.domain);
}

return args;
};

Expand Down

0 comments on commit b39bbce

Please sign in to comment.