diff --git a/server/ctrl/files.go b/server/ctrl/files.go index c8d769ae..f87f2649 100644 --- a/server/ctrl/files.go +++ b/server/ctrl/files.go @@ -1,13 +1,14 @@ package ctrl import ( - "fmt" + "hash/fnv" . "github.com/mickael-kerjean/filestash/server/common" "github.com/mickael-kerjean/filestash/server/model" "io" "net/http" "path/filepath" "strings" + "strconv" "time" ) @@ -40,15 +41,20 @@ func FileLs(ctx App, res http.ResponseWriter, req *http.Request) { } files := make([]FileInfo, len(entries)) - etag := fmt.Sprintf("%d", len(entries)) + path + etagger := fnv.New32() + etagger.Write([]byte(path + strconv.Itoa(len(entries)))) for i:=0; i