Skip to content

Commit

Permalink
fix scp for #45
Browse files Browse the repository at this point in the history
  • Loading branch information
yongkangchen committed Oct 10, 2014
1 parent 5dd2762 commit 68ff99f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/transports/ScpTransport.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ class ScpTransport
callback?()

fetchFileTree: (localPath, callback) ->
targetPath = path.join(@settings.target,
{isIgnore, target} = @settings

targetPath = path.join(target,
path.relative(atom.project.getPath(), localPath))
.replace(/\\/g, "/")
{isIgnore} = @settings


@_getConnection (err, c) ->
return callback err if err
Expand All @@ -85,7 +87,7 @@ class ScpTransport
result.on "data", (data) -> buf += data.toString()
result.on "end", ->
files = buf.split("\n").filter((f) ->
return f and not isIgnore(f, targetPath))
return f and not isIgnore(f, target))

callback null, files

Expand Down

0 comments on commit 68ff99f

Please sign in to comment.