Simplify --root argument checking

- We haven't accepted url's in as root since ages, wipe out the goo
This commit is contained in:
Panu Matilainen 2010-08-20 10:19:26 +03:00
parent 66ce5dc19c
commit a3795d0dc2
2 changed files with 4 additions and 20 deletions

View File

@ -187,16 +187,8 @@ int main(int argc, char *argv[])
"installation, erasure, querying, and "
"database rebuilds"));
if (rpmcliRootDir) {
switch (urlIsURL(rpmcliRootDir)) {
default:
if (bigMode & MODES_FOR_ROOT)
break;
case URL_IS_UNKNOWN:
if (rpmcliRootDir[0] != '/')
argerror(_("arguments to --root (-r) must begin with a /"));
break;
}
if (rpmcliRootDir && rpmcliRootDir[0] != '/') {
argerror(_("arguments to --root (-r) must begin with a /"));
}
if (quiet)

12
rpmqv.c
View File

@ -424,16 +424,8 @@ int main(int argc, char *argv[])
"installation, erasure, querying, and "
"database rebuilds"));
if (rpmcliRootDir) {
switch (urlIsURL(rpmcliRootDir)) {
default:
if (bigMode & MODES_FOR_ROOT)
break;
case URL_IS_UNKNOWN:
if (rpmcliRootDir[0] != '/')
argerror(_("arguments to --root (-r) must begin with a /"));
break;
}
if (rpmcliRootDir && rpmcliRootDir[0] != '/') {
argerror(_("arguments to --root (-r) must begin with a /"));
}
if (quiet)