open folder after receiving

This commit is contained in:
Zack Scholl 2018-10-19 07:30:24 -07:00
parent 79f7e9af41
commit 0e4fff7378
1 changed files with 5 additions and 5 deletions

View File

@ -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 {