Fix option parsing
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-05-06 00:30:54 +02:00
parent efda1a8262
commit b8d5618c9f

View File

@@ -353,7 +353,7 @@ func (d *ofsDriver) Mount(r *volume.MountRequest) (*volume.MountResponse, error)
log.WithFields(log.Fields{"name": v.Volume.Name, "snapshot": v.BackupSnapshot}).Info("Failed to create a new backup snapshot")
return &volume.MountResponse{}, err
} else {
v.BackupSnapshot = strings.SplitAfter(snapshotIdWithSuffix, " ")[0]
v.BackupSnapshot = strings.Split(snapshotIdWithSuffix, " ")[0]
fs = v.BackupSnapshot
}
}
@@ -846,7 +846,7 @@ func setIntersect[TKey comparable, TValue any, TValue2 any](a map[TKey]TValue, b
}
func addMountOption(mountOpts map[string]string, keyVal string) {
keyValA := strings.SplitAfterN(keyVal, "=", 2)
keyValA := strings.SplitN(keyVal, "=", 2)
key := keyValA[0]
var val string
if len(keyValA) <= 1 {