From f74bba9e0c827683fc1405c4e41c95bb5f154ec8 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 29 Jun 2009 13:05:09 +0000 Subject: do not crash if index can not be found --- lib/MDV/Draklive/Media.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/MDV') diff --git a/lib/MDV/Draklive/Media.pm b/lib/MDV/Draklive/Media.pm index bdf4834..d75eeb4 100644 --- a/lib/MDV/Draklive/Media.pm +++ b/lib/MDV/Draklive/Media.pm @@ -48,7 +48,7 @@ sub get_media_source_for_nash { sub find_partition_index { my ($media, $mntpoint) = @_; - find_index { $_->{mntpoint} eq $mntpoint } @{$media->{partitions}}; + eval { find_index { $_->{mntpoint} eq $mntpoint } @{$media->{partitions}} }; } 1; -- cgit v1.2.1