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

List:       busybox-cvs
Subject:    [BusyBox 0003914]: busybox unzip overwrite existing files
From:       bugs () busybox ! net (bugs at busybox ! net)
Date:       2008-06-29 14:15:24
Message-ID: 6a4cf9cceed0e3be4fe69caa93c4938e () busybox ! net
[Download RAW message or body]


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=3914 
====================================================================== 
Reported By:                prien
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   3914
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             06-29-2008 06:58 PDT
Last Modified:              06-29-2008 07:15 PDT
====================================================================== 
Summary:                    busybox unzip overwrite existing files
Description: 
when i execute busybox unzip -o myfile.zip, I want to decompress new myfile
to overwrite existing old myfile,but it produces unexpected results. If the
size of the new file(myfile) is smalller than the old one, it cannot
completely override the old file, and I got the wrong file.

I look for the source code in archival/unzip.c and find 369 line:

369    dst_fd = bb_xopen(dst_fn, O_WRONLY | O_CREAT);

I change it with:

369    dst_fd = bb_xopen(dst_fn, O_WRONLY | O_CREAT | O_TRUNC);

so busybox unzip -o myfile.zip can work right
====================================================================== 

---------------------------------------------------------------------- 
 vda - 06-29-08 07:15  
---------------------------------------------------------------------- 
This bug was fixed 1.5 years ago. Try newer version. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-29-08 06:58  prien          New Issue                                    
06-29-08 06:58  prien          Status                   new => assigned     
06-29-08 06:58  prien          Assigned To               => BusyBox         
06-29-08 07:15  vda            Status                   assigned => closed  
06-29-08 07:15  vda            Note Added: 0008834                          
======================================================================


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

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