mirror of
https://github.com/mudler/luet.git
synced 2025-09-03 16:25:19 +00:00
Fixup clean path uninstall
While uninstalling, we weren't checking if we left any empty dir behind. Now we walk the full path to the file in the artifact, and check each subdir if it's empty. If it is, we delete it as it is claimed by the package
This commit is contained in:
@@ -17,9 +17,18 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
func ReverseAny(s interface{}) {
|
||||
n := reflect.ValueOf(s).Len()
|
||||
swap := reflect.Swapper(s)
|
||||
for i, j := 0, n-1; i < j; i, j = i+1, j-1 {
|
||||
swap(i, j)
|
||||
}
|
||||
}
|
||||
|
||||
func MapMatchRegex(m *map[string]string, r *regexp.Regexp) bool {
|
||||
ans := false
|
||||
|
||||
|
Reference in New Issue
Block a user