Browse Source

feat():add log when unzip fails

EMqmyd 4 years ago
parent
commit
02c13d43c4
1 changed files with 3 additions and 1 deletions
  1. 3 1
      plugins/manager.go

+ 3 - 1
plugins/manager.go

@@ -383,7 +383,9 @@ func (m *Manager) install(t PluginType, name string, src string) ([]string, stri
 			}
 			filenames = append(filenames, yamlPath)
 		} else if fileName == name+".json" {
-			unzipTo(file, path.Join(m.etcDir, PluginTypes[t], fileName))
+			if err := unzipTo(file, path.Join(m.etcDir, PluginTypes[t], fileName)); nil != err {
+				common.Log.Errorf("Failed to decompress the metadata %s file", fileName)
+			}
 		} else if soPrefix.Match([]byte(fileName)) {
 			soPath := path.Join(m.pluginDir, PluginTypes[t], fileName)
 			err = unzipTo(file, soPath)