diff --git a/core/src/build-staging/rsync.ts b/core/src/build-staging/rsync.ts index e933a88e67..3cf485b81a 100644 --- a/core/src/build-staging/rsync.ts +++ b/core/src/build-staging/rsync.ts @@ -105,6 +105,10 @@ export class BuildDirRsync extends BuildStaging { await ensureDir(targetDir) await ensureDir(tmpDir) + // this is so that the cygwin-based rsync client can deal with the paths + sourcePath = normalizeLocalRsyncPath(sourcePath) + targetPath = normalizeLocalRsyncPath(targetPath) + if (sourceShouldBeDirectory) { sourcePath += "/" } @@ -112,10 +116,6 @@ export class BuildDirRsync extends BuildStaging { targetPath += "/" } - // this is so that the cygwin-based rsync client can deal with the paths - sourcePath = normalizeLocalRsyncPath(sourcePath) - targetPath = normalizeLocalRsyncPath(targetPath) - // the correct way to copy all contents of a folder is using a trailing slash and not a wildcard sourcePath = stripWildcard(sourcePath) targetPath = stripWildcard(targetPath)