Browse Source

handle readInfo error

Xiang Li 12 years ago
parent
commit
c7e7e13aa4
1 changed files with 4 additions and 1 deletions
  1. 4 1
      config.go

+ 4 - 1
config.go

@@ -54,7 +54,10 @@ func readInfo(path string) *Info {
 	file, err := os.Open(path)
 	file, err := os.Open(path)
 
 
 	if err != nil {
 	if err != nil {
-		return nil
+		if err == os.ErrNotExist {
+			return nil
+		}
+		fatal(err)
 	}
 	}
 	defer file.Close()
 	defer file.Close()