From 0ad7b93d5898aeb3902e42776b2783c557d92b36 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 3 Sep 2014 20:34:00 -0400 Subject: [PATCH] code hardening: empty file = invalid file (except user data) --- js/assets.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/assets.js b/js/assets.js index 6f66c7eaf..bd2f86bec 100644 --- a/js/assets.js +++ b/js/assets.js @@ -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; }