{"action":"created","issue":{"url":"https://api.github.com/repos/jerrysu/gulp-rsync/issues/33","labels_url":"https://api.github.com/repos/jerrysu/gulp-rsync/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/jerrysu/gulp-rsync/issues/33/comments","events_url":"https://api.github.com/repos/jerrysu/gulp-rsync/issues/33/events","html_url":"https://github.com/jerrysu/gulp-rsync/issues/33","id":125515933,"number":33,"title":"cwrsync not creating folders on server","user":{"login":"reggie3","id":7347192,"avatar_url":"https://avatars.githubusercontent.com/u/7347192?v=3","gravatar_id":"","url":"https://api.github.com/users/reggie3","html_url":"https://github.com/reggie3","followers_url":"https://api.github.com/users/reggie3/followers","following_url":"https://api.github.com/users/reggie3/following{/other_user}","gists_url":"https://api.github.com/users/reggie3/gists{/gist_id}","starred_url":"https://api.github.com/users/reggie3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reggie3/subscriptions","organizations_url":"https://api.github.com/users/reggie3/orgs","repos_url":"https://api.github.com/users/reggie3/repos","events_url":"https://api.github.com/users/reggie3/events{/privacy}","received_events_url":"https://api.github.com/users/reggie3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-08T00:28:50Z","updated_at":"2016-02-01T10:10:51Z","closed_at":null,"body":"I've gotten the following gulp task to transfer files from a Windows 10 machine to a remote Linux server.  However, files are being copied with a backslash \"\\\" vice forward slash \"/\" resulting in long file names like \"js\\myjs.js\" instead of creating a folder called \"js\" with \"myjs.js\" in it.  I haven't found an option or switch to fix the problem.  Any ideas what I'm doing wrong?\r\n\r\n\r\ngulp.task('deploy', function() {\r\n  return gulp.src('dist/**/*')\r\n    .pipe(rsync({\r\n      options: {\r\n                chmod: 'ugo=rwX',\r\n                'r': true,\r\n                'v': true,\r\n                'delete': true,\r\n                'verbose': true,\r\n                'progress': true\r\n            },\r\n      username: \"user\",\r\n      password: \"pass\",\r\n      hostname: 'host.com',\r\n      destination: '~/test/',\r\n      recursive: true,\r\n      root: \"dist/\"\r\n    }));\r\n});"},"comment":{"url":"https://api.github.com/repos/jerrysu/gulp-rsync/issues/comments/177890725","html_url":"https://github.com/jerrysu/gulp-rsync/issues/33#issuecomment-177890725","issue_url":"https://api.github.com/repos/jerrysu/gulp-rsync/issues/33","id":177890725,"user":{"login":"nevf","id":486142,"avatar_url":"https://avatars.githubusercontent.com/u/486142?v=3","gravatar_id":"","url":"https://api.github.com/users/nevf","html_url":"https://github.com/nevf","followers_url":"https://api.github.com/users/nevf/followers","following_url":"https://api.github.com/users/nevf/following{/other_user}","gists_url":"https://api.github.com/users/nevf/gists{/gist_id}","starred_url":"https://api.github.com/users/nevf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nevf/subscriptions","organizations_url":"https://api.github.com/users/nevf/orgs","repos_url":"https://api.github.com/users/nevf/repos","events_url":"https://api.github.com/users/nevf/events{/privacy}","received_events_url":"https://api.github.com/users/nevf/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T10:10:51Z","updated_at":"2016-02-01T10:10:51Z","body":"@reggie3 I've got the same problem and have battling with all day. \r\n\r\nIn gulp-rsync ```index.js``` change:\r\n````\r\n      source: sources.map(function(source) {\r\n        return path.relative(cwd, source.path) || '.';\r\n      }),\r\n````\r\nto:\r\n````\r\n      source: sources.map(function(source) {\r\n        var file_path = (path.relative(cwd, source.path) || '.').replace( /\\\\/g, '/')\r\n        // console.log( 'gulp-rsync source:', source.path, ', ret: ', file_path );\r\n        return file_path\r\n      }),\r\n````\r\n\r\n```path.relative()``` is the culprit.\r\n\r\nThere may be a better solution and I'll continue looking at it tomorrow,"}}