repo_deb: The control file may not have a leading "./". Thanks djszapi!
authorMichael Schroeder <mls@suse.de>
Wed, 16 Nov 2011 13:32:56 +0000 (14:32 +0100)
committerMichael Schroeder <mls@suse.de>
Wed, 16 Nov 2011 13:34:13 +0000 (14:34 +0100)
ext/repo_deb.c

index 39739de44a493f444b61c41fb2f4b3efc545558a..fcd4ebbfa829b92c5e05d4bf4ae8d3b312e50963 100644 (file)
@@ -573,7 +573,7 @@ repo_add_debs(Repo *repo, const char **debs, int ndebs, int flags)
          for (j = 124; j < 124 + 12; j++)
            if (bp[j] >= '0' && bp[j] <= '7')
              l2 = l2 * 8 + (bp[j] - '0');
-         if (!strcmp((char *)bp, "./control"))
+         if (!strcmp((char *)bp, "./control") || !strcmp((char *)bp, "control"))
            break;
          l2 = 512 + ((l2 + 511) & ~511);
          l -= l2;
@@ -581,7 +581,7 @@ repo_add_debs(Repo *repo, const char **debs, int ndebs, int flags)
        }
       if (l <= 512 || l - 512 - l2 <= 0 || l2 <= 0)
        {
-         fprintf(stderr, "%s: control.tar.gz contains no ./control file\n", debs[i]);
+         fprintf(stderr, "%s: control.tar.gz contains no control file\n", debs[i]);
          free(ctar);
          continue;
        }