Skip to content

Commit 63c0041

Browse files
committed
fix: resolve workspace path before saving config
1 parent ae7013c commit 63c0041

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gptme/config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,10 @@ def from_dict(cls, config_data: dict) -> Self:
265265
# Extract chat settings
266266
chat_data = config_data.pop("chat", {})
267267

268-
# Convert workspace to Path if present
268+
# Convert workspace to Path if present and resolve to absolute path
269269
if "workspace" in chat_data:
270-
chat_data["workspace"] = Path(chat_data["workspace"])
270+
workspace_path = Path(chat_data["workspace"])
271+
chat_data["workspace"] = workspace_path.resolve()
271272
# For old-style config, check if workspace is in the logdir
272273
elif _logdir and (_logdir / "workspace").exists():
273274
chat_data["workspace"] = (_logdir / "workspace").resolve()

0 commit comments

Comments
 (0)