~vcs-imports/reprepro/trunk

« back to all changes in this revision

Viewing changes to debfilecontents.c

  • Committer: Bernhard R. Link
  • Date: 2016-12-28 15:50:42 UTC
  • mfrom: (462.3.2)
  • Revision ID: git-v1:9f408a164edf32cad2f5737579fb4871f6fe211b
Tags: reprepro-debian-5.1.1-1
change version to 5.1.1-1 (unstable)
new bugfix release

Show diffs side-by-side

added added

removed removed

Lines of Context:
166
166
                        ar_archivemember_setcompression(ar, c);
167
167
                        if (uncompression_supported(c)) {
168
168
                                struct archive *tar;
 
169
                                int a;
169
170
 
170
171
                                tar = archive_read_new();
171
172
                                r = read_data_tar(filelist, size,
172
173
                                                debfile, ar, tar);
173
 
                                // TODO: check how to get an error message here..
174
 
                                archive_read_free(tar);
 
174
                                a = archive_read_close(tar);
 
175
                                if (a != ARCHIVE_OK && !RET_WAS_ERROR(r)) {
 
176
                                        int e = archive_errno(tar);
 
177
                                        if (e == -EINVAL)
 
178
                                                fprintf(stderr,
 
179
"reading data.tar within '%s' failed: %s\n",
 
180
                                                        debfile,
 
181
                                                        archive_error_string(
 
182
                                                                tar));
 
183
                                        else
 
184
                                                fprintf(stderr,
 
185
"reading data.tar within '%s' failed: %d:%d:%s\n", debfile, a, e,
 
186
                                                        archive_error_string(
 
187
                                                                tar));
 
188
                                        r = RET_ERROR;
 
189
                                }
 
190
                                a = archive_read_free(tar);
 
191
                                if (a != ARCHIVE_OK && !RET_WAS_ERROR(r)) {
 
192
                                        r = RET_ERROR;
 
193
                                }
175
194
                                if (r != RET_NOTHING) {
176
195
                                        ar_close(ar);
177
196
                                        free(filename);