[libhttpseverywhere: 5/21] update: automatically create update directory
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhttpseverywhere: 5/21] update: automatically create update directory
- Date: Tue, 22 Nov 2016 14:37:42 +0000 (UTC)
commit f381cae6367bd10847f0eff7f458f6ebeaf7cf53
Author: grindhold <grindhold gmx net>
Date: Tue Oct 25 03:15:07 2016 +0200
update: automatically create update directory
src/update.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/update.vala b/src/update.vala
index 2be56a6..7acd1f7 100644
--- a/src/update.vala
+++ b/src/update.vala
@@ -216,6 +216,13 @@ namespace HTTPSEverywhere {
* It will return true on success and false on failure
*/
public async void update(Cancellable? cancellable = null) throws UpdateError, IOError {
+ try {
+ var f = File.new_for_path(UPDATE_DIR);
+ f.make_directory_with_parents();
+ } catch {
+ critical("Could not create "+UPDATE_DIR+"\n");
+ }
+
lock_update();
try {
yield execute_update(cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]