working commit
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user