diff --git a/src/cmds/restic/global_debug.go b/src/cmds/restic/global_debug.go index 998f349b2..5c0ec75a6 100644 --- a/src/cmds/restic/global_debug.go +++ b/src/cmds/restic/global_debug.go @@ -55,8 +55,8 @@ func runDebug() error { if memProfilePath != "" { prof = profile.Start(profile.Quiet, profile.MemProfile, profile.ProfilePath(memProfilePath)) - } else if memProfilePath != "" { - prof = profile.Start(profile.Quiet, profile.CPUProfile, profile.ProfilePath(memProfilePath)) + } else if cpuProfilePath != "" { + prof = profile.Start(profile.Quiet, profile.CPUProfile, profile.ProfilePath(cpuProfilePath)) } if insecure {