feat(config): move config dir to ~/.config/termscp on macOS and %USERPROFILE%\.termscp on Windows#432
Merged
Conversation
…PROFILE%\.termscp on Windows Resolve the config directory through a single per-platform config_dir() function instead of relying on dirs::config_dir everywhere: - macOS: ~/.config/termscp (was ~/Library/Application Support/termscp) - Windows: %USERPROFILE%\.termscp (was roaming %APPDATA%\termscp) - Linux/other: /termscp (unchanged) Existing users are migrated automatically on first run: when the new directory is absent and the legacy location exists, the whole config directory is moved to the new path. The cache directory stays at the platform-native location. Closes #431
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reflect the new config directory locations (~/.config/termscp on macOS, %USERPROFILE%\.termscp on Windows) across the English and Chinese docs, and add a CLAUDE.md note to keep both translations in sync.
|
✔️ c276ef1...45b34e5 - Conventional commits check succeeded. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves the config directory to more convenient, CLI-friendly locations on macOS and Windows, resolved through a single per-platform
config_dir()function insrc/system/environment.rs.~/Library/Application Support/termscp~/.config/termscp%APPDATA%\termscp(Roaming)%USERPROFILE%\.termscp$XDG_CONFIG_HOME/termscpMigration
Existing users are migrated automatically on first run: when the new directory is absent and the legacy location (
dirs::config_dir()/termscp) exists, the whole config directory (config.toml,bookmarks.toml,.ssh/, ...) is moved (fs::rename) to the new path. No-op on Linux (legacy == new).Cache dir
Stays platform-native (
dirs::cache_dir()/termscp) — behavior unchanged.Tests
should_migrate_legacy_config_dir,should_not_migrate_when_new_dir_exists,should_not_migrate_without_legacy_dir.cargo +nightly fmtandcargo clippy --no-default-features -- -Dwarningsclean.Closes #431