From 79c39f4eee9bdd0144f59a9ef9bf7ea8d8aea9cb Mon Sep 17 00:00:00 2001 From: fanpei91 Date: Mon, 22 Apr 2019 10:08:23 +0800 Subject: [PATCH] Fixed #76 --- torsniff.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torsniff.go b/torsniff.go index 3885f8c..69c45b3 100644 --- a/torsniff.go +++ b/torsniff.go @@ -201,7 +201,7 @@ func (t *torsniff) saveTorrent(infohashHex string, data []byte) error { return err } - f, err := fileutil.TryLockFile(name, os.O_RDWR|os.O_CREATE, 0755) + f, err := fileutil.TryLockFile(name, os.O_WRONLY|os.O_CREATE, 0755) if err != nil { return err }