Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UNC path backslashes doubled #18

Open
Mephisto64 opened this issue Dec 29, 2019 · 0 comments
Open

UNC path backslashes doubled #18

Mephisto64 opened this issue Dec 29, 2019 · 0 comments

Comments

@Mephisto64
Copy link

The sharing address must have its backslashes doubled. (L'adresse du partage doit obligatoirement avoir ses anti-slashs doublés.)

With Error

const Smb = require('samba-client');
const samba = new Smb({
            'contoso.corp.local',
            'usr12345',
            'P@ssw0rd',
            '\\\\computername\\share'
        });
samba.getFile('file.txt', '/folder/file.txt');
...
\computernameshare: Not enough '\' characters in service
...

Without error

const Smb = require('samba-client');
const samba = new Smb({
            'contoso.corp.local',
            'usr12345',
            'P@ssw0rd',
            '\\\\\\\\computername\\\\\\share'
        });
samba.getFile('file.txt', '/folder/file.txt');

Correction proposal

Change your line 20

- this.address = options.address;
+ this.address = wrap(options.address);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant