File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -241,11 +241,10 @@ const RuleWriter = {
241241 return rv ;
242242 } ,
243243
244- read : function ( file , rule_store , ruleset_id ) {
244+
245+ read : function ( file ) {
245246 if ( ! file . exists ( ) )
246247 return null ;
247- if ( ( rule_store . targets == null ) && ( rule_store . targets != { } ) )
248- this . log ( WARN , "TARGETS IS NULL" ) ;
249248 var data = "" ;
250249 var fstream = CC [ "@mozilla.org/network/file-input-stream;1" ]
251250 . createInstance ( CI . nsIFileInputStream ) ;
@@ -262,6 +261,14 @@ const RuleWriter = {
262261
263262 sstream . close ( ) ;
264263 fstream . close ( ) ;
264+ return data ;
265+ } ,
266+
267+ rulesetFromFile : function ( file , rule_store , ruleset_id ) {
268+ if ( ( rule_store . targets == null ) && ( rule_store . targets != { } ) )
269+ this . log ( WARN , "TARGETS IS NULL" ) ;
270+ var data = this . read ( file ) ;
271+ if ( ! data ) return null ;
265272 return this . readFromString ( data , rule_store , ruleset_id ) ;
266273 } ,
267274
You can’t perform that action at this time.
0 commit comments