strip plugin path from zipped files
This commit is contained in:
@ -147,6 +147,7 @@ func createZip() error {
|
|||||||
|
|
||||||
walker := func(path string, info os.FileInfo, err error) error {
|
walker := func(path string, info os.FileInfo, err error) error {
|
||||||
fmt.Printf("Crawling: %#v\n", path)
|
fmt.Printf("Crawling: %#v\n", path)
|
||||||
|
zippath := strings.Replace(path, "plugin/", "", 1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -159,7 +160,7 @@ func createZip() error {
|
|||||||
}
|
}
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
||||||
f, err := w.Create(path)
|
f, err := w.Create(zippath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -178,7 +179,7 @@ func createZip() error {
|
|||||||
func createSu3() (*su3.File, error) {
|
func createSu3() (*su3.File, error) {
|
||||||
su3File := su3.New()
|
su3File := su3.New()
|
||||||
su3File.FileType = su3.FileTypeZIP
|
su3File.FileType = su3.FileTypeZIP
|
||||||
su3File.ContentType = su3.ContentTypeReseed
|
su3File.ContentType = su3.ContentTypePlugin
|
||||||
|
|
||||||
err := createZip()
|
err := createZip()
|
||||||
if err != err {
|
if err != err {
|
||||||
|
@ -79,7 +79,7 @@ func (pc *PluginConfig) PrintPluginName() string {
|
|||||||
}
|
}
|
||||||
func (pc *PluginConfig) PrintKeyName() string {
|
func (pc *PluginConfig) PrintKeyName() string {
|
||||||
if pc.KeyName == nil {
|
if pc.KeyName == nil {
|
||||||
return fmt.Sprintf("key=%s\n", "")
|
return ""
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("key=%s\n", *pc.KeyName)
|
return fmt.Sprintf("key=%s\n", *pc.KeyName)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user