Добавлена возможность зарегистрировать локальный снапшот
This commit is contained in:
@@ -444,8 +444,8 @@ type diffArchiveReader struct {
|
||||
// Close closes the file and removes the temporary archive and staging directory.
|
||||
func (r *diffArchiveReader) Close() error {
|
||||
err := r.File.Close()
|
||||
os.Remove(r.tempArchive)
|
||||
os.RemoveAll(r.tempStaging)
|
||||
_ = os.Remove(r.tempArchive)
|
||||
_ = os.RemoveAll(r.tempStaging)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -517,8 +517,8 @@ func (data *SnapshotManagerData) createDiffArchive(ctx context.Context, snapshot
|
||||
|
||||
tempArchivePath := filepath.Join(data.blobStore.GetBaseDir(), "diff-"+snapshotID+".zip")
|
||||
if err := archive.CreateArchive(tempStagingDir, tempArchivePath); err != nil {
|
||||
os.RemoveAll(tempStagingDir)
|
||||
os.Remove(tempArchivePath)
|
||||
_ = os.RemoveAll(tempStagingDir)
|
||||
_ = os.Remove(tempArchivePath)
|
||||
return "", "", fmt.Errorf("failed to create diff archive: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user