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
1 changed files with 2 additions and 1 deletions

View File

@ -384,7 +384,8 @@ var readLocalFile = function(path, callback) {
var onCachedContentReady = function(details) {
//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);
return;
}