Merge branch 'fix-create-perm-for-linux'

This commit is contained in:
Nicolas Dextraze 2016-07-02 11:47:37 -07:00
commit b3280c7759
2 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@ type IndexEntry struct {
}
func appendIndex(filename string, entry *IndexEntry) error {
indexFile, err := os.OpenFile(filename, os.O_APPEND | os.O_WRONLY | os.O_CREATE, 0)
indexFile, err := os.OpenFile(filename, os.O_APPEND | os.O_WRONLY | os.O_CREATE, 0644)
if err != nil {
return err
}
@ -95,7 +95,7 @@ func readIndexNextEntry(f *os.File) (*IndexEntry, error) {
}
func writeEvent(filename string, data []byte) error {
eventFile, err := os.OpenFile(filename, os.O_APPEND | os.O_WRONLY | os.O_CREATE, 0)
eventFile, err := os.OpenFile(filename, os.O_APPEND | os.O_WRONLY | os.O_CREATE, 0644)
if err != nil {
return err
}

View File

@ -94,13 +94,13 @@ func (me DiskStorage) Write(event *StoredEvent) error {
filename := me.getFilenameForEvents(event.StreamId.String())
os.MkdirAll(path.Dir(filename), os.ModeDir)
indexFile, err := os.OpenFile(me.indexPath, os.O_APPEND | os.O_WRONLY | os.O_CREATE, 0)
indexFile, err := os.OpenFile(me.indexPath, os.O_APPEND | os.O_WRONLY | os.O_CREATE, 0644)
if err != nil {
return err
}
defer indexFile.Close()
eventsFile, err := os.OpenFile(filename, os.O_APPEND | os.O_WRONLY | os.O_CREATE, 0)
eventsFile, err := os.OpenFile(filename, os.O_APPEND | os.O_WRONLY | os.O_CREATE, 0644)
if err != nil {
return err
}