1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02: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) {
//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;
}