Browse Source

Better implementation of removal of COVER_DATA_DIR if not empty

Loïc Hoguin 7 years ago
parent
commit
79c329aec7
1 changed files with 1 additions and 2 deletions
  1. 1 2
      plugins/cover.mk

+ 1 - 2
plugins/cover.mk

@@ -81,8 +81,7 @@ ifneq ($(COVER_REPORT_DIR),)
 
 
 cover-report-clean:
 cover-report-clean:
 	$(gen_verbose) rm -rf $(COVER_REPORT_DIR)
 	$(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),)
 ifeq ($(COVERDATA),)
 cover-report:
 cover-report: