mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
use filepath.Base() instead of path.Base() for temp files (#882)
This commit is contained in:
parent
f24bbc1838
commit
1aeda6bb50
@ -5,14 +5,13 @@ import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/anchore/syft/internal/log"
|
||||
)
|
||||
|
||||
func saveArchiveToTmp(archiveVirtualPath string, reader io.Reader) (string, string, func(), error) {
|
||||
name := path.Base(archiveVirtualPath)
|
||||
name := filepath.Base(archiveVirtualPath)
|
||||
tempDir, err := ioutil.TempDir("", "syft-archive-contents-")
|
||||
if err != nil {
|
||||
return "", "", func() {}, fmt.Errorf("unable to create tempdir for archive processing: %w", err)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user