Fix backup issues (#2966)

Make backup directory setting optional. Use the basename of the database file for the naming.
This commit is contained in:
WithoutPants
2022-09-30 20:57:28 +10:00
committed by GitHub
parent 9e44e13f6d
commit 7b83d81820
2 changed files with 2 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ func (r *mutationResolver) ConfigureGeneral(ctx context.Context, input ConfigGen
existingBackupDirectoryPath := c.GetBackupDirectoryPath()
if input.BackupDirectoryPath != nil && existingBackupDirectoryPath != *input.BackupDirectoryPath {
if err := validateDir(config.BackupDirectoryPath, *input.BackupDirectoryPath, false); err != nil {
if err := validateDir(config.BackupDirectoryPath, *input.BackupDirectoryPath, true); err != nil {
return makeConfigGeneralResult(), err
}