-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect values sent to onprogress for getFileEntry #41
Comments
That does not fix the issue... test function importZipToFilesystem(callback) {
zipFs.importHttpContent(URL, false, function() {
zipFs.root.getFileEntry(filesystem.root, callback,
function(current, total){
var totalPercentage = (current / total) * 100;
console.log("onprogress: "+current+"total: "+total + ": "+Math.round(totalPercentage,2)+"%");
},
onerror);
}, onerror);
} This results in: The problem seem like uncompressed size and total size is compressed... there is an issue, but that does not fix it. |
I did a second test and it appear to fix the issue, my apologies. It was probably cached... there are however multiple callbacks for the same file, haven't' found a workaround for that yet: Unzip FILE: page0001_i1.jpg zip-fs.js:235 |
Hi, Thanks for filling the issue I'm really sorry but I can't work on zip.js issues currently. I hope I'll find some free time in one week or two... |
@gregpsycle removing |
@danielweck / @gregpsycle Patches are welcome ;) |
I was able to reproduce the issue, it should be fixed now. |
2013 ... how time passes :) |
You bet! :) |
I have a zipfs into which I've imported a blob. I'm using getFileEntry to then extract the zip to an HTML5 filesystem inside a Chrome app. This all works fine.
The onprogress callback though, is getting 'index' (first argument) values that fluctuate (i.e. don't always get bigger), and aren't always smaller than 'max size' (second argument). Max-size is correct.
I think the fix is to change line 236 in zip-fs.js from:
onprogress(currentIndex + index, totalSize);
to just:
onprogress(currentIndex, totalSize);
but I might be misunderstanding what this is meant to be doing.
The text was updated successfully, but these errors were encountered: