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

getFile does not handle destination correctly #39

Open
Vogel612 opened this issue Jul 1, 2021 · 1 comment
Open

getFile does not handle destination correctly #39

Vogel612 opened this issue Jul 1, 2021 · 1 comment

Comments

@Vogel612
Copy link

Vogel612 commented Jul 1, 2021

When calling getFile with a destination that is an absolute path (or more generally, with a path including /) the file is incorrectly stored locally.

The cause of the issue is the replacement of / with \\ in getCleanedSmbClientArgs for the destination argument.

I think this can be somewhat avoided by using the workingDir option, but strictly speaking the destination argument should be exempt from that sort of path modification.

@dabid3
Copy link

dabid3 commented Jan 11, 2022

I actually was having the same issue but according to the smbclient manual the get command has the following configuration: get [local file name]. So, the getFile function destination argument is actually the destination name of the file and not the destination location. You can use then the workingDir argument to define where you want to place the file.

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

2 participants