mirror of https://github.com/portainer/portainer
fix(edge-config): allow empty filter type EE-5962 (#10381)
parent
2dfa4a7c45
commit
b4b44e6fa4
|
@ -80,12 +80,16 @@ func shouldIncludeEntry(dirEntry DirEntry, deviceName, configPath string, filter
|
||||||
return shouldIncludeFile(dirEntry, deviceName, configPath)
|
return shouldIncludeFile(dirEntry, deviceName, configPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if filterType == portainer.PerDevConfigsTypeDir {
|
||||||
// Include:
|
// Include:
|
||||||
// dir entry A/B/C/<deviceName>
|
// dir entry A/B/C/<deviceName>
|
||||||
// all entries A/B/C/<deviceName>/*
|
// all entries A/B/C/<deviceName>/*
|
||||||
return shouldIncludeDir(dirEntry, deviceName, configPath)
|
return shouldIncludeDir(dirEntry, deviceName, configPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func isInConfigRootDir(dirEntry DirEntry, configPath string) bool {
|
func isInConfigRootDir(dirEntry DirEntry, configPath string) bool {
|
||||||
// get the first element of the configPath
|
// get the first element of the configPath
|
||||||
rootDir := strings.Split(configPath, string(os.PathSeparator))[0]
|
rootDir := strings.Split(configPath, string(os.PathSeparator))[0]
|
||||||
|
|
Loading…
Reference in New Issue