Ouput files without .txt suffix

This commit is contained in:
2025-07-06 10:43:52 +00:00
parent 3a8fdb5378
commit 48923ebad5

View File

@ -129,7 +129,7 @@ func (rb *RouterBackup) BackupCommands(commands []string, outputDir string) erro
return fmt.Errorf("failed to create directory %s: %v", outputDir, err)
}
filename := fmt.Sprintf("%s.txt", rb.hostname)
filename := rb.hostname
filepath := filepath.Join(outputDir, filename)
// Truncate file at start