1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-30 23:52:07 +03:00

need to do chdir in goroutine

This commit is contained in:
Zack Scholl 2018-10-24 07:19:03 -07:00
parent 034074d7a3
commit 818e590d92

View File

@ -154,16 +154,15 @@ func main() {
return
}
// change into the receiving directory
cwd, _ := os.Getwd()
defer os.Chdir(cwd)
os.Chdir(fn)
cr := croc.Init(false)
cr.WindowRecipientPrompt = true
done := make(chan bool)
go func() {
// change into the receiving directory
cwd, _ := os.Getwd()
defer os.Chdir(cwd)
os.Chdir(fn)
err := cr.Receive(codePhrase)
if err == nil {
open.Run(fn)