Skip to content

Commit fd38135

Browse files
improved backup dir error message
1 parent 6dd90ae commit fd38135

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/managers/backupmgr/cleanup.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ func (m *BackupManager) getBackupGroups() ([]BackupGroup, error) {
135135
return nil
136136
})
137137
if err != nil {
138+
// if the error contains no such file or directory, return nil but return a custom string intsted of the error
139+
if strings.Contains(err.Error(), "no such file or directory") {
140+
return nil, fmt.Errorf("save dir doesn't seem to exist (yet). Try starting the gameserver and click ↻ once it's up. If the Save folder exists and you still get this error, verify the 'Use New Terrain and Save System' setting. Detailed Error: %w", err)
141+
}
138142
return nil, fmt.Errorf("failed to walk safe backup dir: %w", err)
139143
}
140144

0 commit comments

Comments
 (0)