create registry.log if not there.

This commit is contained in:
Jae Kwon 2015-04-28 04:01:29 -07:00
parent 5366d808ba
commit 9babda1d7a
1 changed files with 1 additions and 1 deletions

View File

@ -276,7 +276,7 @@ func ListProcesses() (*ResponseListProcesses, error) {
// Another barak instance registering its external // Another barak instance registering its external
// address to a remote barak. // address to a remote barak.
func Register(w http.ResponseWriter, req *http.Request) { func Register(w http.ResponseWriter, req *http.Request) {
registry, err := os.OpenFile(barak.rootDir+"/registry.log", os.O_RDWR|os.O_APPEND, 0x600) registry, err := os.OpenFile(barak.rootDir+"/registry.log", os.O_RDWR|os.O_APPEND|os.O_CREATE, 0x600)
if err != nil { if err != nil {
http.Error(w, "Could not open registry file. Please contact the administrator", 500) http.Error(w, "Could not open registry file. Please contact the administrator", 500)
return return