summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xurpmi.addmedia1
1 files changed, 1 insertions, 0 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia
index ce7063a8..d6493991 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -111,6 +111,7 @@ $options{verbose} > 0 or $urpm->{log} = sub {};
$sync_logger = \&urpm::download::sync_logger if $options{verbose} > 1;
$url or ($url, $name) = ($name, '');
+$url =~ m,^(([^:]*):/)?/, or die N("bad <url> (for local directory, the path must be absolute)\n");
if ($< != 0) {
$urpm->{fatal}(1, N("Only superuser is allowed to add media"));