]> git.lizzy.rs Git - micro.git/blobdiff - cmd/micro/messenger.go
Don't print error message if history file doesn't exist
[micro.git] / cmd / micro / messenger.go
index 1212725b21a0746e873c636735e43416a6916f14..0d20603a2df05f026a30e5f4293631d50937ae8c 100644 (file)
@@ -497,11 +497,11 @@ func (m *Messenger) LoadHistory() {
                        decoder := gob.NewDecoder(file)
                        err = decoder.Decode(&decodedMap)
                        file.Close()
-               }
 
-               if err != nil {
-                       m.Error("Error loading history:", err)
-                       return
+                       if err != nil {
+                               m.Error("Error loading history:", err)
+                               return
+                       }
                }
 
                m.history = decodedMap