mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
Minor improvements to UI
This commit is contained in:
parent
3d14420ff8
commit
dbb5ddf2b6
2 changed files with 9 additions and 4 deletions
10
connect.go
10
connect.go
|
@ -317,10 +317,16 @@ func (c *Connection) runClient() error {
|
|||
log.Debugf("meta data received: %v", c.File)
|
||||
// have the main thread ask for the okay
|
||||
if id == 0 {
|
||||
fType := "file"
|
||||
fName := path.Join(c.Path, c.File.Name)
|
||||
if c.File.IsDir {
|
||||
fType = "folder"
|
||||
fName = fName[:len(fName)-4]
|
||||
}
|
||||
if _, err := os.Stat(path.Join(c.Path, c.File.Name)); os.IsNotExist(err) {
|
||||
fmt.Printf("Receiving file (%s) into: %s\n", humanize.Bytes(uint64(c.File.Size)), path.Join(c.Path, c.File.Name))
|
||||
fmt.Printf("Receiving %s (%s) into: %s\n", fType, humanize.Bytes(uint64(c.File.Size)), fName)
|
||||
} else {
|
||||
fmt.Printf("Overwriting file %s (%s)\n", path.Join(c.Path, c.File.Name), humanize.Bytes(uint64(c.File.Size)))
|
||||
fmt.Printf("Overwriting %s %s (%s)\n", fType, fName, humanize.Bytes(uint64(c.File.Size)))
|
||||
}
|
||||
var sentFileNames []string
|
||||
|
||||
|
|
1
main.go
1
main.go
|
@ -39,7 +39,6 @@ func main() {
|
|||
( ` + "`" + `~+++,,_||__,,++~^^^^^^^
|
||||
...V^V^V^V^V^V^\...............................
|
||||
|
||||
|
||||
`)
|
||||
flags := new(Flags)
|
||||
flag.BoolVar(&flags.Relay, "relay", false, "run as relay")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue