File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ from shlex import quote
2929import xml .etree .ElementTree as ET
3030
3131# Constants
32- ZYPPERONI_VERSION = "1.0.7 "
32+ ZYPPERONI_VERSION = "1.0.8 "
3333ZYPPER_PID_FILE = "/run/zypp.pid"
3434ZYPPER_ENV = "ZYPP_CURL2=1 ZYPP_PCK_PRELOAD=1 ZYPP_SINGLE_RPMTRANS=1"
3535
@@ -121,9 +121,12 @@ def recursive_delete(path):
121121 ZYPPERONI_TMP_DIR
122122 except NameError :
123123 return False
124- if not path .startswith (tempfile . gettempdir () ) or not path .startswith (ZYPPERONI_TMP_DIR ):
124+ if not path .startswith ("/tmp" ) or not path .startswith (ZYPPERONI_TMP_DIR ):
125125 return False
126- command = f"findmnt { quote (path )} > /dev/null 2>&1 || rm -r { quote (path )} > /dev/null 2>&1"
126+ out , ret = shell_exec ("mount -l | grep -c '/tmp/zypperoni_'" )
127+ if int (out ) > 0 :
128+ return False
129+ command = f"rm -r { quote (path )} > /dev/null 2>&1"
127130 os .system (command )
128131 return True
129132
You can’t perform that action at this time.
0 commit comments