From 79c329aec7518132f0e67d2316998e8feb2a8c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 16 Sep 2017 23:51:17 +0200 Subject: Better implementation of removal of COVER_DATA_DIR if not empty --- plugins/cover.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/cover.mk b/plugins/cover.mk index a14b992..60809a3 100644 --- a/plugins/cover.mk +++ b/plugins/cover.mk @@ -81,8 +81,7 @@ ifneq ($(COVER_REPORT_DIR),) cover-report-clean: $(gen_verbose) rm -rf $(COVER_REPORT_DIR) - # Remove the COVER_DATA_DIR only if it is empty. - -$(verbose) rmdir $(COVER_DATA_DIR) + $(if $(shell ls -A $(COVER_DATA_DIR)/),,$(verbose) rmdir $(COVER_DATA_DIR)) ifeq ($(COVERDATA),) cover-report: -- cgit v1.2.3