mirror of
https://github.com/Adembc/lazyssh.git
synced 2026-07-14 12:13:34 +02:00
make the original file name in const
This commit is contained in:
@@ -136,7 +136,7 @@ func (r *Repository) createOriginalBackupIfNeeded() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
configDir := filepath.Dir(r.configPath)
|
configDir := filepath.Dir(r.configPath)
|
||||||
originalBackupPath := filepath.Join(configDir, "config.original.backup")
|
originalBackupPath := filepath.Join(configDir, OriginalBackupName)
|
||||||
|
|
||||||
if _, err := r.fileSystem.Stat(originalBackupPath); err == nil {
|
if _, err := r.fileSystem.Stat(originalBackupPath); err == nil {
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -23,10 +23,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MaxBackups = 10
|
MaxBackups = 10
|
||||||
TempSuffix = ".tmp"
|
TempSuffix = ".tmp"
|
||||||
BackupSuffix = "lazyssh.backup"
|
BackupSuffix = "lazyssh.backup"
|
||||||
SSHConfigPerms = 0o600
|
SSHConfigPerms = 0o600
|
||||||
|
OriginalBackupName = "config.original.backup"
|
||||||
)
|
)
|
||||||
|
|
||||||
// filterServers filters servers based on the query string.
|
// filterServers filters servers based on the query string.
|
||||||
|
|||||||
Reference in New Issue
Block a user