xbps-repo: put back sanitize_url() and improve the implementation.

This commit is contained in:
Juan RP
2010-05-20 14:45:12 +02:00
parent 3038fbed2d
commit 8e764dca60
2 changed files with 52 additions and 18 deletions

View File

@ -99,13 +99,11 @@ main(int argc, char **argv)
if (argc < 1)
usage();
if ((rv = xbps_repository_pool_init()) != 0) {
if (rv != ENOENT) {
fprintf(stderr,
"E: cannot get repository list pool! %s\n",
strerror(rv));
exit(EXIT_FAILURE);
}
rv = xbps_repository_pool_init();
if (rv != 0 && rv != ENOENT) {
fprintf(stderr, "E: cannot get repository list pool! %s\n",
strerror(rv));
exit(EXIT_FAILURE);
}
if (strcasecmp(argv[0], "add") == 0) {