[sawfish] more robustness for apps-menu (non-readable files)



commit 2da834604e0f046a124393a262547b07d9aa6b20
Author: Christopher Roy Bratusek <zanghar freenet de>
Date:   Sat Feb 13 10:28:45 2010 +0100

    more robustness for apps-menu (non-readable files)

 ChangeLog                        |    4 ++++
 lisp/sawfish/wm/ext/apps-menu.jl |    7 ++++---
 man/news.texi                    |   10 ++++++----
 3 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d24041c..5750953 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-13  Christopher Bratusek <zanghar freenet de>
+	* lisp/sawfish/wm/ext/apps-menu.jl: non-readable .desktop files are no longer stopping sawfish startup
+	                                    though files with permission 000 are still...
+
 2010-02-10  Christopher Bratusek <zanghar freenet de>
 	* lisp/sawfish/wm/ext/apps-menu.jl: - ignore .desktop files that are symlinks
 	                                    - don't crash if first char of a keyvalue is ;
diff --git a/lisp/sawfish/wm/ext/apps-menu.jl b/lisp/sawfish/wm/ext/apps-menu.jl
index 34ceb75..8309f23 100644
--- a/lisp/sawfish/wm/ext/apps-menu.jl
+++ b/lisp/sawfish/wm/ext/apps-menu.jl
@@ -330,9 +330,10 @@ exile it."
   (define (generate-menu-entry desk-file)
     "Generate a menu entry to run the program specified in the the
 .desktop file `desk-file'."
-    (if (and (not (file-directory-p desk-file))
-	     (desktop-file-p desk-file)
-	     (not (file-symlink-p desk-file)))
+    (if (and (file-readable-p desk-file)
+             (not (file-directory-p desk-file))
+             (not (file-symlink-p desk-file))
+	     (desktop-file-p desk-file))
 	(let ((fdo-list (fdo-check-exile (parse-desktop-file desk-file))))
 	  (if apps-menu-ignore-no-display
 	      (let ((a (assoc "NoDisplay" fdo-list)))
diff --git a/man/news.texi b/man/news.texi
index 89d0bdd..ea18124 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -17,12 +17,14 @@ they occurred between. For more detailed information see the
 
 @item Bugfixes
 @itemize @minus
- item Apps-menu is more robust now. [Matthew Love]
+ item Apps-menu is more robust now. [Matthew Love] [Christopher Bratusek]
 
 Sawfish application-menu @code{apps-menu} introduced in 1.6.0, crashed
-if the desktop file was a symlink, or if the keyvalue was malformed
-(say ; as first character or # somewhere inside). Those .desktop files
-no longer let sawfish crash (or stop the startup-process).
+if the desktop file was a symlink, non-readable or if the keyvalue was
+malformed (say ; as first character or # somewhere inside). Those .desktop
+files no longer let sawfish crash (or stop the startup-process).
+
+Files with permissions of 000 still cause that issue.
 @end itemize
 @item New features
 @itemize @minus



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