We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 600ccfd commit d2ee49dCopy full SHA for d2ee49d
internal/content/extended.go
@@ -3,12 +3,11 @@ package content
3
import (
4
"encoding/xml"
5
"fmt"
6
- "github.com/valyala/bytebufferpool"
7
-
8
"github.com/Equationzhao/g/internal/global"
9
"github.com/Equationzhao/g/internal/item"
10
"github.com/Equationzhao/g/internal/render"
11
"github.com/pkg/xattr"
+ "github.com/valyala/bytebufferpool"
12
"howett.net/plist"
13
)
14
@@ -32,6 +31,10 @@ func formatBytes(bytes []byte) string {
32
31
33
// formatXattrValue attempts to parse the xattr value and returns a human-readable string.
34
func formatXattrValue(value []byte) string {
+ if len(value) == 0 {
35
+ return "<empty>"
36
+ }
37
+
38
// Check if the value is a binary plist
39
var plistData any
40
if _, err := plist.Unmarshal(value, &plistData); err == nil {
0 commit comments