Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'upgrade' of https://github.com/lrenn/clojars-web into l…

…renn-upgrade
  • Loading branch information...
commit 7a8c258454593ed05f9a2421301a1f8d0c295580 2 parents 1c92916 + acfc880
@ato ato authored
Showing with 12 additions and 10 deletions.
  1. +12 −10 src/clojars/scp.clj
View
22 src/clojars/scp.clj
@@ -152,16 +152,18 @@
(when okay
(send-okay ctx))
- (let [cmd (char (.read in))]
- (condp = cmd
- (char 0) (do (recur files false))
- \C (recur (conj files (scp-copy ctx)) true)
- \D (do (safe-read-line in) (recur files true))
- \T (do (safe-read-line in) (recur files true))
- \E (do (safe-read-line in) (recur files true))
- (char 65535) (finish-deploy ctx files)
- (throw (IOException. (str "Unknown scp command: '"
- (int cmd) "'")))))))
+ (let [cmd (.read in)]
+ (if (= -1 cmd)
+ (finish-deploy ctx files)
+ (let [cmd (char cmd)]
+ (condp = cmd
+ (char 0) (do (recur files false))
+ \C (recur (conj files (scp-copy ctx)) true)
+ \D (do (safe-read-line in) (recur files true))
+ \T (do (safe-read-line in) (recur files true))
+ \E (do (safe-read-line in) (recur files true))
+ (throw (IOException. (str "Unknown scp command: '"
+ (int cmd) "'")))))))))
(catch Throwable t
;(.printStackTrace t *err*)
Please sign in to comment.
Something went wrong with that request. Please try again.