[libhttpseverywhere: 9/21] Updater: don't critical if datadir already exists



commit 50b42590956def092e4cc7b3dc6585ea2ca3c23e
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon Oct 24 21:08:59 2016 -0500

    Updater: don't critical if datadir already exists

 src/update.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/update.vala b/src/update.vala
index fb22d6b..b071860 100644
--- a/src/update.vala
+++ b/src/update.vala
@@ -220,7 +220,8 @@ namespace HTTPSEverywhere {
                 var f = File.new_for_path(UPDATE_DIR);
                 f.make_directory_with_parents();
             } catch (Error e) {
-                critical("Could not create %s: %s", UPDATE_DIR, e.message);
+                if (!(e is IOError.EXISTS))
+                    critical("Could not create %s: %s", UPDATE_DIR, e.message);
             }
 
             lock_update();


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