Skip to content

Commit

Permalink
Fix running already installed konnectors (afero) (#2924)
Browse files Browse the repository at this point in the history
When a konnector was installed before we start using brotli for
apps&konnectors assets on a stack with afero FS (not swift), the files
were saved with a .gz extension. They are now saved with a .br
extension.

When running a konnector, we list the files, decompress them and rewrite
them in the temporary directory that will be used to execute them. We
have forgotten to remove the .gz extension for konnectors that were
already installed and nodejs didn't like that as it was expecting a .js
file.
  • Loading branch information
nono committed Mar 1, 2021
1 parent 5c13f2c commit 08b7b9f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/appfs/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ func (s *aferoServer) FilesList(slug, version, shasum string) ([]string, error)
}
if !infos.IsDir() {
name := strings.TrimPrefix(path, rootPath)
name = strings.TrimSuffix(name, ".gz")
name = strings.TrimSuffix(name, ".br")
names = append(names, name)
}
Expand Down

0 comments on commit 08b7b9f

Please sign in to comment.