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

Fix "Fix renaming bug" #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions lib/deploy.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/deploy.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,15 @@ module.exports = class Deploy
if data.length > 1
# If you set a local path, we need to replace the remote name to match the remote path
remoteName = if @config.path.local then data[1].split(@config.path.local).join("") else data[1]
if typeof data[2] != "undefined"
remoteRename = if @config.path.local then data[2].split(@config.path.local).join("") else data[2]

# The file was renamed
if data[0] == "R100"
@toDelete.push name:data[1], remote:remoteName if @canDelete data[1]
@toUpload.push name:data[2], remote:remoteRename if @canUpload data[2]
# The file was deleted
if data[0] == "D"
else if data[0] == "D"
@toDelete.push name:data[1], remote:remoteName if @canDelete data[1]
# Everything else
else
Expand Down