Skip to content

Commit 43c5743

Browse files
committed
Re-build store + invite when adjusting server url #607
1 parent 161074e commit 43c5743

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ See [STATUS.md](server/STATUS.md) to learn more about which features will remain
1818
- Move Server-Timing header to crate `simple-server-timing-header`
1919
- Add `POST` + `body` support for Endpoints #592
2020
- Refactor `Endpoint` handlers, uses a Context now #592
21+
- Re-build store + invite when adjusting server url #607
2122

2223
## [v0.34.1] - 2023-02-11
2324

server/src/appstate.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ pub fn init(config: Config) -> AtomicServerResult<AppState> {
7575
};
7676
store.set_handle_commit(Box::new(send_commit));
7777

78-
if config.initialize {
78+
// If the user changes their server_url, the drive will not exist.
79+
// In this situation, we should re-build a new drive from scratch.
80+
if config.initialize || store.get_resource(&config.server_url).is_err() {
7981
tracing::info!(
8082
"Running initialization commands (first time startup, or you passed --initialize)"
8183
);

0 commit comments

Comments
 (0)