[Xfce4-commits] <midori:master> Ensure existence of the applications directory
Christian Dywan
noreply at xfce.org
Sat Apr 20 02:48:03 CEST 2013
Updating branch refs/heads/master
to d74bee7bc88f9b36488a63a216f82b26ca4d953d (commit)
from 33e562f96ddab048310a4ef83e6146f2ec6092c5 (commit)
commit d74bee7bc88f9b36488a63a216f82b26ca4d953d
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Apr 20 02:18:23 2013 +0200
Ensure existence of the applications directory
extensions/apps.vala | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/extensions/apps.vala b/extensions/apps.vala
index f2b74db..7be0d2a 100644
--- a/extensions/apps.vala
+++ b/extensions/apps.vala
@@ -196,6 +196,14 @@ namespace Apps {
var data_dir = File.new_for_path (Midori.Paths.get_user_data_dir ());
app_folder = data_dir.get_child ("applications");
try {
+ try {
+ app_folder.make_directory_with_parents (null);
+ }
+ catch (IOError folder_error) {
+ if (!(folder_error is IOError.EXISTS))
+ throw folder_error;
+ }
+
monitor = app_folder.monitor_directory (0, null);
monitor.changed.connect (app_changed);
@@ -219,7 +227,8 @@ namespace Apps {
}
catch (Error io_error) {
monitor = null;
- warning ("Failed to list .desktop files: %s", io_error.message);
+ warning ("Failed to list .desktop files (%s): %s",
+ app_folder.get_path (), io_error.message);
}
}
More information about the Xfce4-commits
mailing list