working commit

This commit is contained in:
2026-03-12 18:02:10 +02:00
parent 27c912d266
commit 920423ffeb
4 changed files with 45 additions and 25 deletions
+3
View File
@@ -11,6 +11,9 @@ func (store *Storage) HelmMeta(filename string) (string, string, error) {
var err error
var meta string
var hash string
filename = store.makeTmppath(filename)
chart, err := loader.Load(filename)
if err != nil {
return meta, hash, err
+2 -2
View File
@@ -78,7 +78,7 @@ func (store *Storage) WriteTempFile(source io.Reader) (string, int64, string, er
var size int64
var csum string
tmpName := fmt.Sprintf("%d.tmp", auxuuid.NewUUID())
tmpName := fmt.Sprintf("%s.tmp", auxuuid.NewUUID())
tmpPath := store.makeTmppath(tmpName)
tmpdirpath := store.makeTmpsubdir()
@@ -120,7 +120,7 @@ func (store *Storage) HardlinkFile(tmpName, collection, filename string) error {
}
filename = store.makeFilepath(collection, filename)
_, err = os.Stat(dirname)
if os.IsExist(err) {
if err == nil {
os.Remove(filename) // TODO: safe removing
}
tmpName = store.makeTmppath(tmpName)