Improve CodeLite symlink handling #3572
Open
+60
−17
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.
Subject: Improve CodeLite symlink handling
This is a new attempt at improving the symlink handling.
I know it is probably not there yet - but now I'll put it up for review :-)
I've added an attempt to have proper option handling.
Operation of FileUtils::RealPath() can be controlled in the Preferences - under the tab "Tabs"
This patch improves CodeLite with projects that have symlinks in the path
If you open a file in a project that has symlinks in its path - you'll see the expanded/resolved path of the file in the window title. Also you'll typically see that CodeLite is unable find the file in the Workspace View
There are several problems in respect to symlinks and the use of realpath() calls that this patch addresses:
Clangd LSP returns realpath() paths
mainbook uses realpath() extensively to figure out if a file is already opened (in another tab).
CodeLite Find-In-Files uses realpath() extensively (and in the end - clicking on the found file opens it)
etc...
This patch basically fakes the use of FileUtils::RealPath() calls - on most occasions just returning the unmodified path.
An optional argument to FileUtils::RealPath() (defaults to false) can force the realpath() conversion (this is only used in very few occasions in this patch)