Skip to content
Snippets Groups Projects
Unverified Commit 443bba79 authored by Pawan Rawal's avatar Pawan Rawal
Browse files

Adding check for existence of mutations directory in commit/log.go.

parent 8ff55e73
No related branches found
No related tags found
No related merge requests found
......@@ -282,6 +282,12 @@ func (l *Logger) Init() {
glog.Debug("Logger init started.")
{
// Checking if the directory exists.
if _, err := os.Stat(l.dir); err != nil {
if os.IsNotExist(err) {
glog.WithError(err).Fatal("Unable to find dir.")
}
}
// First check if we have a current file.
path := filepath.Join(l.dir, fmt.Sprintf("%s-current.log", l.filePrefix))
fi, err := os.Stat(path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment