qemu-devel
[Top][All Lists]
Advanced

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

[PATCH v1] configure: judge build dir permission


From: Guo Zhi
Subject: [PATCH v1] configure: judge build dir permission
Date: Tue, 5 Apr 2022 21:48:20 +0800

If this patch is applied, issue:

https://gitlab.com/qemu-project/qemu/-/issues/321

can be closed.

Signed-off-by: Guo Zhi <qtxuning1999@sjtu.edu.cn>
---
 configure | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 7c08c18358..9cfa78efd2 100755
--- a/configure
+++ b/configure
@@ -24,7 +24,13 @@ then
     then
         if test -f $MARKER
         then
-           rm -rf build
+            if test -w $MARKER
+            then
+                rm -rf build
+            else
+                echo "ERROR: ./build dir already exists and can not be removed 
due to permission"
+                exit 1
+            fi
         else
             echo "ERROR: ./build dir already exists and was not previously 
created by configure"
             exit 1
-- 
2.35.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]