fix: always report resource
This commit is contained in:
@@ -106,6 +106,16 @@ func PropertyGet(pluginName string, appName string, property string) string {
|
|||||||
func PropertyGetAll(pluginName string, appName string) (map[string]string, error) {
|
func PropertyGetAll(pluginName string, appName string) (map[string]string, error) {
|
||||||
properties := make(map[string]string)
|
properties := make(map[string]string)
|
||||||
pluginAppConfigRoot := getPluginAppPropertyPath(pluginName, appName)
|
pluginAppConfigRoot := getPluginAppPropertyPath(pluginName, appName)
|
||||||
|
|
||||||
|
fi, err := os.Stat(pluginAppConfigRoot)
|
||||||
|
if err != nil {
|
||||||
|
return properties, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if !fi.IsDir() {
|
||||||
|
return properties, errors.New("Specified property path is not a directory")
|
||||||
|
}
|
||||||
|
|
||||||
files, err := ioutil.ReadDir(pluginAppConfigRoot)
|
files, err := ioutil.ReadDir(pluginAppConfigRoot)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return properties, err
|
return properties, err
|
||||||
|
|||||||
Reference in New Issue
Block a user