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

./packages/openofficeorg/3.1/unstable r1589: -d also returns true on symlinks...



------------------------------------------------------------
revno: 1589
committer: Rene Engelhard <rene@debian.org>
branch nick: unstable
timestamp: Fri 2009-06-12 18:34:41 +0200
message:
  -d also returns true on symlinks...
modified:
  openoffice.org-common.preinst.in
=== modified file 'openoffice.org-common.preinst.in'
--- a/openoffice.org-common.preinst.in	2009-06-08 07:11:50 +0000
+++ b/openoffice.org-common.preinst.in	2009-06-12 16:34:41 +0000
@@ -23,12 +23,13 @@
 	
 	# try to recover. No idea whether that completely helps but it
 	# at least gets the bogus dir away.
-	if [ -d /usr/lib/openoffice/basis-link ] && \
+	if [ -e /usr/lib/openoffice/basis-link -a \
+		! -L /usr/lib/openoffice/basis-link ] && \
 		[ -e /usr/lib/openoffice/basis-link/share/config/javasettingsunopkginstall.xml ]; then
 		rm -f /usr/lib/openoffice/basis-link/share/config/javasettingsunopkginstall.xml
-		rmdir /usr/lib/openoffice/basis-link/share/config || true
-		rmdir /usr/lib/openoffice/basis-link/share || true
-		rmdir /usr/lib/openoffice/basis-link || true
+		rmdir --ignore-fail-on-non-empty /usr/lib/openoffice/basis-link/share/config
+		rmdir --ignore-fail-on-non-empty /usr/lib/openoffice/basis-link/share
+		rmdir --ignore-fail-on-non-empty /usr/lib/openoffice/basis-link || true
 	fi
 
 	# move a already-filled in javasettingsunopkginstall.xml to the new


Reply to: