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

path in file names #48

Open
atbjk opened this issue Jul 23, 2014 · 5 comments
Open

path in file names #48

atbjk opened this issue Jul 23, 2014 · 5 comments

Comments

@atbjk
Copy link

atbjk commented Jul 23, 2014

I still have this issue. Folders transfer fine, but the files have the path name in them. Server sep is not working for me. Below is the code i use:
'sftp-deploy': {
build: {
auth: {
host: 'joseph.site.devel',
port: 22,
authKey: 'key1'
},
src: 'public',
// cache: 'sftpCache.json',
dest: '/home/httpd/vhosts/site.com/httpdocs/public',
// exclusions: ['public//.DS_Store', 'public//Thumbs.db'],
serverSep: '/',
concurrency: 8,
progress: true

}

@sanojb
Copy link

sanojb commented Jul 29, 2014

I guess you're working on Windows.

This issue can be solved by changing
toFile = remoteRoot + remoteSep + inFilename;
to
toFile = remoteRoot + remoteSep + inFilename.replace(path.sep, remoteSep);
in sftpPut(inFilename, cb).

@rbalmf
Copy link

rbalmf commented Aug 4, 2014

I had this issue too. The above code is almost a fix, but not quite since it only replaces the first separator in the path. Have created a pull request courtesy of sanojb's pointer above with a fix here:
#50

@kallaspriit
Copy link

I can confirm this issue.

@kallaspriit
Copy link

Apparently it has been fixed but the configuration used to use a parameter called "server_sep" which has now been changed to "serverSep" so my value had no effect. Perhaps the old parameter should still work for those updating the library and show deprecated warning.

@barigorokarl
Copy link

Pull request #77 might fix this.
I'm using git-bash under windows and sftp-deploy get's confused with the path separators.
With the fix you can set the option "localSep" according to "serverSep".

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

5 participants