From ee8bc8f5c26c33d814a8dde0f99a97c1c65a4f920b690766e2ed18764bbdf6b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 19 Sep 2014 11:12:26 +0000 Subject: [PATCH] - Do not remove folders too early in the link-to-ooo-home * this fixes warning about trying to remove dir OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=190 --- libreoffice.changes | 6 ++++++ link-to-ooo-home | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libreoffice.changes b/libreoffice.changes index 54945fc..9ea0574 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 19 11:11:42 UTC 2014 - tchvatal@suse.com + +- Do not remove folders too early in the link-to-ooo-home + * this fixes warning about trying to remove dir + ------------------------------------------------------------------- Fri Aug 29 13:29:59 UTC 2014 - tchvatal@suse.com diff --git a/link-to-ooo-home b/link-to-ooo-home index 298666d..a20ae44 100644 --- a/link-to-ooo-home +++ b/link-to-ooo-home @@ -37,7 +37,7 @@ change_linking() { # first just remove the symlinks for file in `cat ${filelist} | grep "/usr/share/libreoffice" | sort`; do linkfile=${file/${datadir}/${libdir}} - if [[ -L "${linkfile}" && ! -r "${linkfile}" ]]; then + if [[ -L "${linkfile}" && ! -r "${linkfile}" && ! -d "${linkfile}" ]]; then rm -f "${linkfile}" || exit 1 fi done