dav/tar.c

changeset 336
6331271116d0
parent 334
5f80c5d0e87f
child 344
72791e299d64
equal deleted inserted replaced
335:c1bc13faadaa 336:6331271116d0
33 #include <libidav/utils.h> 33 #include <libidav/utils.h>
34 34
35 35
36 const char* tar_error2str(TarError error) { 36 const char* tar_error2str(TarError error) {
37 switch(error) { 37 switch(error) {
38 default: break;
38 case TAR_OK: return "ok"; 39 case TAR_OK: return "ok";
39 case TAR_PATH_TOO_LONG: return "path too long"; 40 case TAR_PATH_TOO_LONG: return "path too long";
40 case TAR_FILE_TOO_LARGE: return "file too large"; 41 case TAR_FILE_TOO_LARGE: return "file too large";
41 case TAR_CONTENT_TOO_LARGE: return "tar content too large"; 42 case TAR_CONTENT_TOO_LARGE: return "tar content too large";
42 case TAR_UNFINISHED_FILE: return "can't read a tar header at this position"; 43 case TAR_UNFINISHED_FILE: return "can't read a tar header at this position";
314 int tar_inputstream_close(TarInputStream *tar) { 315 int tar_inputstream_close(TarInputStream *tar) {
315 if(tar->cur_entry.path) { 316 if(tar->cur_entry.path) {
316 free(tar->cur_entry.path); 317 free(tar->cur_entry.path);
317 } 318 }
318 free(tar); 319 free(tar);
319 } 320 return 0;
321 }

mercurial