From 21b7551db1452f05322209b8f4d9c9064e8eefeb Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 27 Jul 2004 06:06:53 +0000 Subject: Make the leading "file://" optional in local media URLs. --- urpmi.addmedia | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'urpmi.addmedia') diff --git a/urpmi.addmedia b/urpmi.addmedia index ca73dc57..7e93498a 100755 --- a/urpmi.addmedia +++ b/urpmi.addmedia @@ -37,7 +37,7 @@ sub usage { # Translator: only what is between can be translated. my $usage = N("usage: urpmi.addmedia [options] [with ] where is one of - file:// with + [file:/]/ with ftp://:@/ with ftp:/// with http:/// with @@ -109,7 +109,7 @@ sub main { #- allow not to give name immediately. $options{distrib} or $url or ($url, $name) = ($name, ''); - my ($type) = $url =~ m,^([^:]*)://, or $options{distrib} or usage; + my ($type) = $url =~ m,^(([^:]*):/)?/, or $options{distrib} or usage; if ($< != 0) { $urpm->{fatal}(1, N("Only superuser is allowed to add media")); @@ -227,7 +227,7 @@ sub main { } } - #- try to umount removable device which may have been mounted. + #- try to umount removable devices which may have been mounted. $urpm->try_umounting_removables; } -- cgit v1.2.1