Compare commits

...

1 Commits

Author SHA1 Message Date
eball
92b600ee19 daemon: update serial filtering logic to use suffix matching 2026-01-04 17:19:54 +08:00

View File

@@ -199,7 +199,7 @@ func MountedHddPath(ctx context.Context) ([]string, error) {
func FilterBySerial(serial string) func(dev storageDevice) bool {
return func(dev storageDevice) bool {
return dev.IDSerial == serial || dev.IDSerialShort == serial
return strings.HasSuffix(serial, dev.IDSerial) || strings.HasSuffix(serial, dev.IDSerialShort)
}
}