mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Merge pull request #2127 from nagy/check-history-error
Check for history file errors as well
This commit is contained in:
commit
ebe971da2e
|
@ -148,9 +148,11 @@ func loadHistory() {
|
||||||
|
|
||||||
func saveHistory() {
|
func saveHistory() {
|
||||||
if f, err := os.Create(historyPath); err != nil {
|
if f, err := os.Create(historyPath); err != nil {
|
||||||
fmt.Printf("Error writing history file: %v\n", err)
|
fmt.Printf("Error creating history file: %v\n", err)
|
||||||
} else {
|
} else {
|
||||||
line.WriteHistory(f)
|
if _, err = line.WriteHistory(f); err != nil {
|
||||||
|
fmt.Printf("Error writing history file: %v\n", err)
|
||||||
|
}
|
||||||
f.Close()
|
f.Close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue