G-Node / gin-cli

Command line client for GIN
https://gin.g-node.org
Other
12 stars 6 forks source link

Fix log trimming on Windows #243

Closed achilleas-k closed 5 years ago

achilleas-k commented 5 years ago

On Windows, file.Truncate(0) fails for the logfile because it's open and Windows locks open files. The trimming fails and the logfile can grow to very large sizes.

https://github.com/G-Node/gin-cli/blob/b25ad01a7a6e99c5b84ae1532ad41ac06d858722/ginclient/log/log.go#L36