bcle/fuse4js

Issue with large file sizes

serisman opened this issue · 1 comments

I have a virtual file that is 3,472,655,443 bytes long and I set the stat.size to this length in the getattr handler. I believe it is in a javascript Number object which should be able to handle up to 53 bit numbers or 9,007,199,254,740,992.

The operating system (Ubuntu Server 14.04) is reporting a file size of 18,446,744,072,887,239,763 when doing a 'ls -l' on the directory holding the file.

I also have this directory shared to windows (over samba) which reports the file size as -822,311,853 bytes.

There is something weird going on here that smells a lot like the number being marshaled into too small of a container in the fuse4js code.

Never mind. I had a bug in the .js code.

I had
stat.size = item.fileSize | 0;
instead of
stat.size = item.fileSize || 0;