mirror of https://github.com/schollz/croc.git
tell server no
This commit is contained in:
parent
6d9c829579
commit
b1aeedb107
|
@ -110,15 +110,14 @@ func receive(c *websocket.Conn, codephrase string) (err error) {
|
||||||
if fstats.IsDir {
|
if fstats.IsDir {
|
||||||
fileOrFolder = "folder"
|
fileOrFolder = "folder"
|
||||||
}
|
}
|
||||||
if "y" != utils.GetInput(fmt.Sprintf(
|
if "y" != utils.GetInput(fmt.Sprintf("%s %s (%s) into: %s\nok? (y/N): ",
|
||||||
`%s %s (%s) into: %s
|
|
||||||
ok? (y/N): `,
|
|
||||||
overwritingOrReceiving,
|
overwritingOrReceiving,
|
||||||
fileOrFolder,
|
fileOrFolder,
|
||||||
humanize.Bytes(uint64(fstats.Size)),
|
humanize.Bytes(uint64(fstats.Size)),
|
||||||
fstats.Name,
|
fstats.Name,
|
||||||
)) {
|
)) {
|
||||||
fmt.Fprintf(os.Stderr, "cancelling request")
|
fmt.Fprintf(os.Stderr, "cancelling request")
|
||||||
|
c.WriteMessage(websocket.BinaryMessage, []byte("no"))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue