Merge pull request #101 from perses/master
dirwatch: fix panic when attemting to copy func into [20]byte
This commit is contained in:
commit
174e7192b5
|
@ -137,12 +137,15 @@ func main() {
|
|||
resolveTestPeerAddr()
|
||||
fs := torrentfs.New(client)
|
||||
go exitSignalHandlers(fs)
|
||||
go func() {
|
||||
for {
|
||||
addTestPeer(client)
|
||||
time.Sleep(10 * time.Second)
|
||||
}
|
||||
}()
|
||||
|
||||
if testPeerAddr != nil {
|
||||
go func() {
|
||||
for {
|
||||
addTestPeer(client)
|
||||
time.Sleep(10 * time.Second)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
if err := fusefs.Serve(conn, fs); err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
|
@ -69,7 +69,7 @@ func torrentFileInfoHash(fileName string) (ih metainfo.Hash, ok bool) {
|
|||
if mi == nil {
|
||||
return
|
||||
}
|
||||
missinggo.CopyExact(ih[:], mi.Info.Hash)
|
||||
ih = mi.Info.Hash()
|
||||
ok = true
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue