File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -288,15 +288,13 @@ func (g *RepositoryDumper) CreateLabels(_ context.Context, labels ...*base.Label
288288func (g * RepositoryDumper ) CreateReleases (_ context.Context , releases ... * base.Release ) error {
289289 if g .opts .ReleaseAssets {
290290 for _ , release := range releases {
291- relDir := uuid .New ().String ()
292- attachDir := filepath .Join ("release_assets" , relDir )
291+ attachDir := filepath .Join ("release_assets" , uuid .New ().String ())
293292 if err := os .MkdirAll (filepath .Join (g .baseDir , attachDir ), os .ModePerm ); err != nil {
294293 return err
295294 }
296295 for _ , asset := range release .Assets {
297- p := uuid .New ().String ()
298296 // we cannot use asset.Name because it might contains special characters.
299- attachLocalPath := filepath .Join (attachDir , p )
297+ attachLocalPath := filepath .Join (attachDir , uuid . New (). String () )
300298
301299 // SECURITY: We cannot check the DownloadURL and DownloadFunc are safe here
302300 // ... we must assume that they are safe and simply download the attachment
You can’t perform that action at this time.
0 commit comments