mirror of
https://github.com/garethgeorge/backrest.git
synced 2025-12-17 11:05:38 +00:00
fix: miscellaneous bug fixes
* Fixes a problem with incorrectly scanning and removing pending events from the operation log for new installations * Fixes a bug with the operation tree incorrectly applying query selectors when filtering events * Updates tooltips and comments in PlanView and GettingStartedGuide
This commit is contained in:
@@ -27,8 +27,8 @@ func SanitizeID(id string) string {
|
||||
// It returns an error if the ID contains invalid characters, is empty, or is too long.
|
||||
// The maxLen parameter is the maximum length of the ID. If maxLen is 0, the ID length is not checked.
|
||||
func ValidateID(id string, maxLen int) error {
|
||||
if strings.HasPrefix(id, "__") && strings.HasSuffix(id, "__") {
|
||||
return errors.New("IDs starting and ending with '__' are reserved by backrest")
|
||||
if strings.HasPrefix(id, "_") && strings.HasSuffix(id, "_") {
|
||||
return errors.New("IDs starting and ending with '_' are reserved by backrest")
|
||||
}
|
||||
if !idRegex.MatchString(id) {
|
||||
return ErrInvalidChars
|
||||
|
||||
Reference in New Issue
Block a user