From 792ba3f6b88f871029dcafcb9dae0f5baa96fa22 Mon Sep 17 00:00:00 2001 From: belliash Date: Fri, 13 Jan 2012 19:32:47 +0100 Subject: [PATCH] we want to completely remove this folder; add some hack to avoid staying in non-existen directory what might lead in getcwd() errors --- libraries/filesystem | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/filesystem b/libraries/filesystem index 5193e98..f282c27 100644 --- a/libraries/filesystem +++ b/libraries/filesystem @@ -129,6 +129,7 @@ function mergeOverlay() { local FTS="${4}" local ORW="${5}" local SRC="${1}" + local TOPDIR="$(pwd)" makeCleanDirectory ${TRASHDIR}/ebuilds || return 1 cd ${SRC} saveIFS "," @@ -167,7 +168,8 @@ function mergeOverlay() { done < <(find * -maxdepth 0) cd .. done < <(find * -maxdepth 0 -type d) - rm -rf ${TRASHDIR}/ebuilds/* + cd ${TOPDIR} + rm -rf ${TRASHDIR}/ebuilds return 0 }