mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-17 06:17:12 +09:00
util: Generalize the file mode of 0666 with util.FileMode
This commit is contained in:
@@ -18,7 +18,7 @@ func (NullWriter) Write(data []byte) (n int, err error) {
|
||||
// InitLog sets up the debug log system for micro if it has been enabled by compile-time variables
|
||||
func InitLog() {
|
||||
if util.Debug == "ON" {
|
||||
f, err := os.OpenFile("log.txt", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
|
||||
f, err := os.OpenFile("log.txt", os.O_RDWR|os.O_CREATE|os.O_TRUNC, util.FileMode)
|
||||
if err != nil {
|
||||
log.Fatalf("error opening file: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user