mirror of https://github.com/containers/podman.git
sqlite: fix volume lookups with partial names
Requires the trailing `%` to work correctly, see https://www.sqlitetutorial.net/sqlite-like/ Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
parent
495314a16a
commit
5d2d609be4
|
@ -2033,7 +2033,7 @@ func (s *SQLiteState) LookupVolume(name string) (*Volume, error) {
|
|||
return nil, define.ErrDBClosed
|
||||
}
|
||||
|
||||
rows, err := s.conn.Query("SELECT JSON FROM VolumeConfig WHERE Name LIKE ?;", name)
|
||||
rows, err := s.conn.Query("SELECT JSON FROM VolumeConfig WHERE Name LIKE ?;", name+"%")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("querying database for volume %s: %w", name, err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue