diff options
Diffstat (limited to 'os.go')
-rw-r--r-- | os.go | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -17,7 +17,14 @@ const assetPrefix string = "/$asset$/" var fs afero.Fs func InitOS() { - fs = afero.NewOsFs() + if Perms.FsWrite { + assert(Perms.FsRead, "Write access requires read access.") + fs = afero.NewOsFs() + } else if Perms.FsRead { + fs = afero.NewReadOnlyFs(afero.NewOsFs()) + } else { + panic("Not implemented.") + } Sub("os", func(buf []byte) []byte { msg := &Msg{} |