mirror of https://github.com/schollz/croc.git
open folder after receiving
This commit is contained in:
parent
79f7e9af41
commit
0e4fff7378
|
@ -6,7 +6,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
humanize "github.com/dustin/go-humanize"
|
humanize "github.com/dustin/go-humanize"
|
||||||
|
@ -122,6 +121,7 @@ func main() {
|
||||||
dialog("Can only do one send or receive at a time")
|
dialog("Can only do one send or receive at a time")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
labels[1].SetText("")
|
||||||
labels[2].SetText("please wait...")
|
labels[2].SetText("please wait...")
|
||||||
isWorking = true
|
isWorking = true
|
||||||
defer func() {
|
defer func() {
|
||||||
|
@ -158,13 +158,13 @@ func main() {
|
||||||
|
|
||||||
done := make(chan bool)
|
done := make(chan bool)
|
||||||
go func() {
|
go func() {
|
||||||
cr.Receive(codePhrase)
|
err := cr.Receive(codePhrase)
|
||||||
|
if err == nil {
|
||||||
|
open.Run(fn)
|
||||||
|
}
|
||||||
done <- true
|
done <- true
|
||||||
done <- true
|
done <- true
|
||||||
isWorking = false
|
isWorking = false
|
||||||
if strings.Contains(cr.StateString, "Received") {
|
|
||||||
open.Start(fn)
|
|
||||||
}
|
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
|
|
Loading…
Reference in New Issue