Fix modtime bug

This commit is contained in:
Mukhtar Akere
2025-07-02 01:17:31 +01:00
parent 2c90e518aa
commit c0aa4eaeba
2 changed files with 4 additions and 7 deletions

View File

@@ -8,7 +8,6 @@ import (
"path"
"strconv"
"strings"
"time"
)
type contextKey string
@@ -55,7 +54,6 @@ func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) {
rawEntries = append(rawEntries, h.getChildren(cleanPath)...)
}
now := time.Now().UTC().Format("2006-01-02T15:04:05.000-07:00")
entries := make([]entry, 0, len(rawEntries)+1)
// Add the current file itself
entries = append(entries, entry{
@@ -108,7 +106,7 @@ func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) {
}
_, _ = sb.WriteString(`<d:getlastmodified>`)
_, _ = sb.WriteString(now)
_, _ = sb.WriteString(e.modTime)
_, _ = sb.WriteString(`</d:getlastmodified>`)
_, _ = sb.WriteString(`<d:displayname>`)