diff options
-rwxr-xr-x | bin/ebuild.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index b501e94a2..92b635c3a 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -753,8 +753,8 @@ dyn_clean() { # Some kernels, such as Solaris, return EINVAL when an attempt # is made to remove the current working directory. - cd "$PORTAGE_BUILDDIR"/.. - rmdir "$PORTAGE_BUILDDIR" 2>/dev/null + cd "$PORTAGE_BUILDDIR"/../.. + rmdir "$PORTAGE_BUILDDIR" "${PORTAGE_BUILDDIR%/*}" 2>/dev/null true } |