mirror of
https://github.com/containers/podman.git
synced 2026-10-24 02:39:13 -04:00
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:
1 parent
495314a16a
commit
5d2d609be4
1 file changed
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user