1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-24 08:02:33 +03:00

tell server no

This commit is contained in:
Zack Scholl 2018-09-22 06:14:19 -07:00
parent 6d9c829579
commit b1aeedb107

View File

@ -110,15 +110,14 @@ func receive(c *websocket.Conn, codephrase string) (err error) {
if fstats.IsDir {
fileOrFolder = "folder"
}
if "y" != utils.GetInput(fmt.Sprintf(
`%s %s (%s) into: %s
ok? (y/N): `,
if "y" != utils.GetInput(fmt.Sprintf("%s %s (%s) into: %s\nok? (y/N): ",
overwritingOrReceiving,
fileOrFolder,
humanize.Bytes(uint64(fstats.Size)),
fstats.Name,
)) {
fmt.Fprintf(os.Stderr, "cancelling request")
c.WriteMessage(websocket.BinaryMessage, []byte("no"))
return nil
}