diff --git a/v2/pkg/types/resume.go b/v2/pkg/types/resume.go index 60daabc1..5308888e 100644 --- a/v2/pkg/types/resume.go +++ b/v2/pkg/types/resume.go @@ -11,19 +11,14 @@ import ( ) // Default resume file -const DefaultResumeFileName = "resume.cfg" +const DefaultResumeFileName = "resume-%s.cfg" func DefaultResumeFilePath() string { home, err := os.UserHomeDir() if err != nil { - return DefaultResumeFileName - } - resumeFile := filepath.Join(home, ".config", "nuclei", DefaultResumeFileName) - - // Generate random name if already exists - if _, err := os.Stat(resumeFile); !os.IsNotExist(err) { - resumeFile = filepath.Join(home, ".config", "nuclei", fmt.Sprintf("resume-%s.cfg", xid.New().String())) + return fmt.Sprintf("resume-%s.cfg", xid.New().String()) } + resumeFile := filepath.Join(home, ".config", "nuclei", fmt.Sprintf("resume-%s.cfg", xid.New().String())) return resumeFile }