Remove vc.db exclusion from FindDatabasePath filter
Only filter out backup files, allow vc.db to be a valid database Amp-Thread-ID: https://ampcode.com/threads/T-8600ed89-42af-4785-b5dc-01ad37f1451d Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -147,11 +147,11 @@ func FindDatabasePath() string {
|
||||
// Look for any .db file in the beads directory
|
||||
matches, err := filepath.Glob(filepath.Join(absBeadsDir, "*.db"))
|
||||
if err == nil && len(matches) > 0 {
|
||||
// Filter out backup files and vc.db
|
||||
// Filter out backup files only
|
||||
var validDBs []string
|
||||
for _, match := range matches {
|
||||
baseName := filepath.Base(match)
|
||||
if !strings.Contains(baseName, ".backup") && baseName != "vc.db" {
|
||||
if !strings.Contains(baseName, ".backup") {
|
||||
validDBs = append(validDBs, match)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user