Add tilde (~) expansion support for home directory paths#23105
Open
ExcitedHumvee wants to merge 2 commits intoqbittorrent:masterfrom
Open
Add tilde (~) expansion support for home directory paths#23105ExcitedHumvee wants to merge 2 commits intoqbittorrent:masterfrom
ExcitedHumvee wants to merge 2 commits intoqbittorrent:masterfrom
Conversation
Enables using ~ and ~/path in configurations instead of hard-coded absolute paths, making settings portable across users. - Add Utils::Fs::expandTilde() function - Integrate tilde expansion in session path handling - Support category path tilde expansion - Add comprehensive test coverage
Chocobo1
reviewed
Aug 15, 2025
- Rename testtildeexpansion.cpp to testutilsfs.cpp as requested - Follow qBittorrent coding style with proper copyright header - Add missing Q_DISABLE_COPY_MOVE directive and const methods - Update CMakeLists.txt to reference correct test filename - All 17 tests pass including tilde expansion functionality
|
This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity. |
Author
|
@Chocobo1 , I've addressed the feedback. Could you please take another look when you have a moment? |
|
This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity. |
Member
|
@ExcitedHumvee There are conflicts now that need to be resolved. |
|
This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity. |
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.
Description
Implements tilde (~) expansion for home directory paths in qBittorrent configurations, addressing issue #17583.
This allows users to specify paths like
~/Downloadsinstead of hard-coded absolute paths like/home/username/Downloads, making configuration files portable across users and systems.Changes Made
Core Implementation:
Utils::Fs::expandTilde()function to handle~and~/pathexpansionSessionImplfor save/download path handlingTesting:
testtildeexpansion.cpp~,~/path, absolute paths, relative paths, empty pathsFeatures
~(home directory) and~/path(home + subpath) patterns~usernamepatterns explicitly not supportedUse Cases Addressed
~/Downloadsinstead of/home/username/DownloadsTesting