[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [BusyBox] bug#1272: gunzip -c problem
From:       "Paul Hayter" <paul () lemoncube ! com>
Date:       2002-09-29 18:16:03
[Download RAW message or body]

Package: busybox
Version: 0.60.4
Severity: normal

gunzip -c tries to delete the source file instead of leaving it intact.
The problem code in gunzip.c is:

        if (delete_path && !(flags & gunzip_test)) {
                if (unlink(delete_path) < 0) {
                        error_msg_and_die("Couldn't remove %s",
                        delete_path);
                }
        }

The code should also check the gunzip_to_stdout flag. Here's my poor
hack to fix it:

        if (delete_path && !(flags & gunzip_test) && !(flags &
        gunzip_to_stdout)
) {
                if (unlink(delete_path) < 0) {
                        error_msg_and_die("Couldn't remove %s",
                        delete_path);
                }
        }


I am using Slackware 7.1 with glibc 2.1.3, with kernel 2.4.19

Cheers

Paul.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic