User forums > Using Code::Blocks

Project tree and symlinks

(1/3) > >>

mirai:
In my projects I often use symlinks to bind paths that may vary to definite places in project directory.
Unfortunately, in CB UI the project tree instead of being nice looking is totally blown unto complete ugliness by unrolling all symlinked paths.

Is it possible to tell CB not to follow symlinks at least while displaying the project tree?

mirai:
So, does anybody know how tell CB to display symlinked directories in project tree as if they were regular directories ?

By default, the CB converts all symlinks to their target paths and displays these paths as relative paths in the tree hierarchy,
which results in long hierarchies consisting of many up ".." and down transitions that shouldn't be shown (optionally).

macr0t0r:
I haven't ran into this problem, but the file-tree displays the paths as they are stored in your *.cbp project file.  Take a look inside and see how those paths are stored.  Generally, the paths are relative to the location of the project *.cbp file, but they can have absolute paths as well.  You may need to manually edit the file to get the listing the way you want it. 

If I had to venture a guess, you probably added the files using the absolute path instead of the relative path.  Doing so means that CodeBlocks will request a de-referenced listing of the file to add to the project.  It should work fine if they are relative.

- Jim 

mirai:
Well, the problem is that CB dereferences all symlinks inside relative paths before putting them in a project file and this is even a bigger problem than poor representation of project structure in GUI.

macr0t0r:
How often are you adding/removing files?  As I said, you can at least take the manual approach and modify the paths in your Project *.cbp file.  A little search/replace magic with regular expressions should fix things up.
- Jim

Navigation

[0] Message Index

[#] Next page

Go to full version