[libhttpseverywhere/fullxml] context: remove io-warnings



commit c151160ae70c0e29548cd4870015b4681558c0e6
Author: grindhold <grindhold gmx net>
Date:   Mon Sep 18 21:55:37 2017 +0200

    context: remove io-warnings
    
    the xml-lib wrote its own file-not-found-errors to the console,
    which is not very pretty, so i prevent this by checking for the
    existence of the files myself

 src/context.vala |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/context.vala b/src/context.vala
index 779ac46..83de700 100644
--- a/src/context.vala
+++ b/src/context.vala
@@ -126,6 +126,8 @@ namespace HTTPSEverywhere {
                     bool success = false;
 
                     foreach (string dp in datapaths) {
+                        if (!FileUtils.test(dp, FileTest.EXISTS))
+                            continue;
                         this.ruleset_xml = Xml.Parser.parse_file(dp);
                         if (this.ruleset_xml == null)
                             continue;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]