From ca59555e1697ecd3aa7e11ee3d182b24ff1c23c6 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 20 Nov 2006 14:19:09 +0000 Subject: replace "or" with "if (!..." --- urpm.pm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index b12346f4..021a5744 100644 --- a/urpm.pm +++ b/urpm.pm @@ -1372,16 +1372,18 @@ sub _update_medium__parse_if_unmodified__or_get_files__local { #- this is used to probe for a possible hdlist file. my $with_hdlist_dir = reduce_pathname($dir . ($medium->{with_hdlist} ? "/$medium->{with_hdlist}" : "/..")); - #- the directory given does not exist and may be accessible - #- by mounting some other directory. Try to figure it out and mount - #- everything that might be necessary. - -d $dir or $urpm->try_mounting( - !$options->{force_building_hdlist} && ($options->{probe_with} || $medium->{with_hdlist}) - ? $with_hdlist_dir : $dir, - #- in case of an iso image, pass its name - is_iso($medium->{removable}) && $medium->{removable}, - ) or $urpm->{error}(N("unable to access medium \"%s\", + if (!-d $dir) { + #- the directory given does not exist and may be accessible + #- by mounting some other directory. Try to figure it out and mount + #- everything that might be necessary. + $urpm->try_mounting( + !$options->{force_building_hdlist} && ($options->{probe_with} || $medium->{with_hdlist}) + ? $with_hdlist_dir : $dir, + #- in case of an iso image, pass its name + is_iso($medium->{removable}) && $medium->{removable}, + ) or $urpm->{error}(N("unable to access medium \"%s\", this could happen if you mounted manually the directory when creating the medium.", $medium->{name})), return 'unmodified'; + } my $error; #- try to probe for possible with_hdlist parameter, unless -- cgit v1.2.1