diff --git a/pyproject.toml b/pyproject.toml index 754a179..053f662 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "claudesync" -version = "0.6.3" +version = "0.6.4" authors = [ {name = "Jahziah Wagner", email = "540380+jahwag@users.noreply.github.com"}, ] diff --git a/src/claudesync/configmanager/file_config_manager.py b/src/claudesync/configmanager/file_config_manager.py index 0eef5b9..2ed9c84 100644 --- a/src/claudesync/configmanager/file_config_manager.py +++ b/src/claudesync/configmanager/file_config_manager.py @@ -1,8 +1,8 @@ import json -import logging import os from datetime import datetime from pathlib import Path +import logging from claudesync.configmanager.base_config_manager import BaseConfigManager from claudesync.session_key_manager import SessionKeyManager @@ -85,8 +85,7 @@ def _find_local_config_dir(self, max_depth=100): def _load_local_config(self): """ Loads the local configuration from the nearest .claudesync/config.local.json file. - - Sets the local_config_dir and populates the local_config dictionary. + Automatically normalizes any Windows-style paths. """ self.local_config_dir = self._find_local_config_dir() if self.local_config_dir: @@ -97,6 +96,19 @@ def _load_local_config(self): with open(local_config_file, "r") as f: self.local_config = json.load(f) + # Check and fix Windows-style paths in submodules + if "submodules" in self.local_config: + needs_save = False + for submodule in self.local_config["submodules"]: + if "\\" in submodule["relative_path"]: + submodule["relative_path"] = submodule[ + "relative_path" + ].replace("\\", "/") + needs_save = True + + if needs_save: + self._save_local_config() + def get_local_path(self): """ Retrieves the path of the directory containing the .claudesync folder.