Wrong behaviour while "live" writing in fuse-zip fs.

Issue #20 closed
Former user created an issue

Originally reported on Google Code with ID 20

What steps will reproduce the problem?
1. mount a zip file as usual
2. open new file in the mounted directory
3. write something, close file

So I have simple c program
---- test.c ----

#include <stdio.h>

int main() {
    FILE *inf_h;
    int i;
    inf_h = fopen("/1.log","w");
    for (i=0; i<100000; i++) {
        fprintf(inf_h, "1234567890\n");
    }
    fclose(inf_h);
    return 0;
}

where 'compressed` is a mount point.

# ls compressed/1.log -hs
538M compressed/1.log

This is nonsense, since the real size of the file is only 1.1M.
Well, after fusermount -u, unzip -l shows the correct file size, however
it's always wrong on mouned filesystem.

Also, is there any restriction on a (compressed) file size? I tried to use
fuse-zip to save a huge text file (output from a calculation, up to hundred
Gbs of plane text). However, due to the size issue above, I couldn't save
even a 500Mb file this way, 'cos a (wrong) file size reached 20 GB and
after unmount a got 'fuse-zip[30013]: Error while saving file
01-equilib.cvf in ZIP archive: -12' message.

System: opensuse 11.2, x86_64, linux-2.6.31.5, fuse-2.7.4-3.2,
libzip1-0.9-23.2, zlib-1.2.3-140.2, gcc-4.4.1.

Reported by fedyanin on 2009-11-18 14:43:02

Comments (2)

  1. Former user Account Deleted

    ``` Fixed in version 0.2.8.

    Also, is there any restriction on a (compressed) file size?

    All files kept in memory until file system is unmounted, so file size is limited by available amount of virtual memory in your system. ```

    Reported by `alexander.galanin` on 2009-11-18 18:10:58 - Status changed: `Fixed` - Labels added: Type-Defect, OpSys-All

  2. Log in to comment