Menu

#14 Unable to rename zipped files in directories

open
nobody
None
5
2012-07-18
2006-10-23
dan1123
No

When I rename a file that's not in the zip's root
directory it appears to work, but I get the
error "invalid compression data to inflate" when I
try to extract that file later. The rest of the
files in the zip are not affected and renaming of
files in the zip's root directory work fine. Both of
the following examples cause this issue:

Example 1:

ZipFile.open(zipWithDirs) {
|zf|
zf.file.rename("dir1/file11", "dir1/newfile11")
}

Example 2:

ZipFile.open(zipWithDirs) {
|zf|
zf.dir.chdir('dir1')
zf.file.rename('file11', 'newfile11')
}

Discussion

  • Diego Barros

    Diego Barros - 2008-07-18

    Logged In: YES
    user_id=162749
    Originator: NO

    I've uploaded a patch relating to a rename bug. This may solve your problem. Cheers.

     
  • Diego Barros

    Diego Barros - 2008-07-18

    Logged In: YES
    user_id=162749
    Originator: NO

    I've uploaded a patch relating to a rename bug. This may solve your problem. Cheers.

     

Anonymous
Anonymous

Add attachments
Cancel