vfs: make specialized file Open functions private

This commit is contained in:
Nick Craig-Wood
2017-12-06 16:38:19 +00:00
parent 5ad226ab54
commit 517bdc719b
3 changed files with 26 additions and 24 deletions

View File

@@ -5,6 +5,7 @@ import (
"html/template"
"log"
"net/http"
"os"
"path"
"strconv"
"strings"
@@ -247,7 +248,7 @@ func (s *server) serveFile(w http.ResponseWriter, r *http.Request, remote string
}
// open the object
in, err := file.OpenRead()
in, err := file.Open(os.O_RDONLY)
if err != nil {
internalError(remote, w, "Failed to open file", err)
return