Skip to content

Commit

Permalink
fix(backend): create renamed parent directory
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed May 2, 2023
1 parent d4e11a3 commit 64598e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/backend/sqlite/sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ func (d *SqliteBackend) RenameRepository(oldName string, newName string) error {
return wrapDbErr(err)
}

// Make sure the new repository parent directory exists.
if err := os.MkdirAll(filepath.Dir(np), 0755); err != nil {
return err
}

return os.Rename(op, np)
}

Expand Down

0 comments on commit 64598e6

Please sign in to comment.