1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00

code hardening: empty file = invalid file (except user data)

This commit is contained in:
gorhill 2014-09-03 20:34:00 -04:00
parent 88596cb855
commit 0ad7b93d58

View File

@ -384,7 +384,8 @@ var readLocalFile = function(path, callback) {
var onCachedContentReady = function(details) { var onCachedContentReady = function(details) {
//console.log('µBlock> readLocalFile("%s") / onCachedContentReady()', path); //console.log('µBlock> readLocalFile("%s") / onCachedContentReady()', path);
if ( !details.error && details.content !== '' ) { // It's ok for user data to be empty
if ( !details.error && (details.content !== '' || reIsUserPath.test(path)) ) {
reportBack(details.content); reportBack(details.content);
return; return;
} }