Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Windows: fileutil.TryLockFile panic #76

Closed
tadev opened this issue Apr 21, 2019 · 0 comments
Closed

Windows: fileutil.TryLockFile panic #76

tadev opened this issue Apr 21, 2019 · 0 comments

Comments

@tadev
Copy link
Contributor

tadev commented Apr 21, 2019

On windows, fileutil fails to lock the file using os.O_RDWR|os.O_CREATE (66)

running, it may take a few minutes...
panic: flag 66 is not supported

goroutine 104 [running]:
github.com/fanpei91/torsniff/vendor/go.etcd.io/etcd/pkg/fileutil.open(0xc0001d21e0, 0x47, 0x42, 0xc0000001ed, 0x0, 0x0, 0x0)
        H:/GoWork/src/github.com/fanpei91/torsniff/vendor/go.etcd.io/etcd/pkg/fileutil/lock_windows.go:82 +0x31c
github.com/fanpei91/torsniff/vendor/go.etcd.io/etcd/pkg/fileutil.TryLockFile(0xc0001d21e0, 0x47, 0x42, 0x1ed, 0x0, 0xc0003e18c0, 0x16)
        H:/GoWork/src/github.com/fanpei91/torsniff/vendor/go.etcd.io/etcd/pkg/fileutil/lock_windows.go:44 +0x52
main.(*torsniff).saveTorrent(0xc00008e190, 0xc00000e420, 0x28, 0xc000368000, 0xea23, 0xea23, 0x0, 0x0)
        H:/GoWork/src/github.com/fanpei91/torsniff/torsniff.go:206 +0x154
main.(*torsniff).work(0xc00008e190, 0xc0001581c0, 0xc00004e120)
        H:/GoWork/src/github.com/fanpei91/torsniff/torsniff.go:174 +0x1f5
created by main.(*torsniff).run
        H:/GoWork/src/github.com/fanpei91/torsniff/torsniff.go:138 +0x145

It works fine using os.OpenFile

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant