On Friday 08 June 2007 13:24:25 walter harms wrote:
> that i had in mind, do you see a change or merge this unlinks calls ?
> 
> 
> 
> something (read untested) like that:
>   if (..)
>       myunlink(file_header->name,archive_handle);
> 
> 
> static void myunlink(char *name, archive_handle_t *handle )
> {
>  if ((unlink(name) == -1) && (errno != EISDIR) && (errno != ENOENT) )
> #ifndef CONFIG_CPIO_NONFATAL_UNPACK_ERRORS
>        bb_perror_msg_and_die("Couldnt remove old file %s",name);
> #else
>       bb_perror_msg("Couldnt remove old file %s",name);
>       data_skip(handle);
>       return;
> #endif
> }

Maybe like this?
 
static void myunlink(char *name, archive_handle_t *handle )
{
        if ((unlink(name) == -1) && (errno != EISDIR) && (errno != ENOENT) ) {
                bb_perror_msg("cannot remove old file %s",name);
                if  (!ENABLE_FEATURE_CPIO_NONFATAL_UNPACK_ERRORS)
                        exit(EXIT_FAILURE);
                data_skip(handle);
        }
}

Ciao,
Tito
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to