From 21877355529d6ad1dfd9a21a122e185bf0030803 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sat, 11 Sep 2004 23:59:13 +0000 Subject: [PATCH] dont backup the menu unless we actually have one --- util/fluxbox-generate_menu.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/fluxbox-generate_menu.in b/util/fluxbox-generate_menu.in index ae9f34a0..5c0fe8c6 100755 --- a/util/fluxbox-generate_menu.in +++ b/util/fluxbox-generate_menu.in @@ -22,7 +22,7 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. # -# $Id: fluxbox-generate_menu.in,v 1.29 2004/09/09 15:25:26 rathnor Exp $ +# $Id: fluxbox-generate_menu.in,v 1.30 2004/09/11 23:59:13 fluxgen Exp $ # # Portability notes: @@ -924,7 +924,9 @@ if [ -w "${MENUFILENAME}" ]; then if [ -f ${MENUFILENAME}.firstbak ]; then cp ${MENUFILENAME} ${MENUFILENAME}.firstbak fi - mv ${MENUFILENAME} ${MENUFILENAME}.bak + if [ -s "${MENUFILE}" ]; then + mv ${MENUFILE} ${MENUFILE}.bak + fi fi # prefix