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:
parent
034074d7a3
commit
818e590d92
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user