Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CodeLite symlink handling #3572

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

UffeJakobsen
Copy link
Contributor

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)

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant