Commit 87cee3e6 authored by Axel Beckert's avatar Axel Beckert

Fix generate-flwm-menu-from-desktop-files wrt. missing /usr/share/applications/

Closes: #886935
parent 010230fc
flwm (1.02+git2015.10.03+7dbb30-6) UNRELEASED; urgency=medium
* Fix generate-flwm-menu-from-desktop-files to handle non-existing
/usr/share/applications/ gracefully. (Closes: #886935)
-- Axel Beckert <abe@debian.org> Thu, 11 Jan 2018 23:15:03 +0100
flwm (1.02+git2015.10.03+7dbb30-5) unstable; urgency=medium flwm (1.02+git2015.10.03+7dbb30-5) unstable; urgency=medium
* Fix File::DesktopEntry's package name also in package description. * Fix File::DesktopEntry's package name also in package description.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Script to generate an FLWM menu based on XDG .desktop files # Script to generate an FLWM menu based on XDG .desktop files
# #
# Copyright: 2017 Axel Beckert <abe@debian.org> # Copyright: 2017-2018 Axel Beckert <abe@debian.org>
# License: GPL-2+ # License: GPL-2+
# (See debian/copyright or /usr/share/doc/flwm/copyright for details.) # (See debian/copyright or /usr/share/doc/flwm/copyright for details.)
...@@ -60,6 +60,9 @@ $ENV{PATH} = $ENV{PATH}.':/usr/games'; ...@@ -60,6 +60,9 @@ $ENV{PATH} = $ENV{PATH}.':/usr/games';
$target_dir->remove_tree; $target_dir->remove_tree;
$target_dir->mkpath; $target_dir->mkpath;
# Just exit gracefully if /usr/share/applications/ doesn't exist.
exit(0) unless $desktop_dir->exists;
# Get all .desktop files # Get all .desktop files
my @desktop_files = $desktop_dir->children( qr{ \.desktop $ }x ); my @desktop_files = $desktop_dir->children( qr{ \.desktop $ }x );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment