User forums > General (but related to Code::Blocks)

Suggestion - File Searching & Circular Links

(1/1)

BigAngryDog:
I'm using C::B to work with source files on UNIX. The guys here have a dirty habit of creating circular links left, right and centre in the source code directory structure. I guess this is not uncommon.

Just a suggestion, but when searching for or within files, could C::B detect circular links and ignore them? It's current behaviour is just to hang itself.

mandrav:
What do you mean by circular links? When does C::B hang?
Please post some more info...

BigAngryDog:
Here at least, developers are in the habit of creating directory links (or short-cuts) within projects.

The problem is that these are often circular, i.e. refer back to higher level structure of itself. Like so:


--- Code: ---dir1
|
---dir2
    |
    ---dir3
        |
        ---dir4 (actually a link to dir1)

--- End code ---

So when C::B is searching through the structure, it gets re-directed back to higher level and recurses forever.

I've seen this practice of linking to anywhere and everywhere in other companies. Personally I think it's a really dirty thing to do, and I don't regard it as a fault in C::B.

However, it would be really cool if C::B could detect circular links and ignore them (knowing that it has already searched through the contents). The UNIX "find" command is able to do this, and I'm having to use that.

Cheers

mandrav:
Ok, you still haven't given me the info I need :).
Let me ask you this way: are you talking about the find-in-files functionality when used with a custom filemask? Because that's the only time we actually do a search of the filesystem...
If yes, then I can understand that it fails because we use a wxWidgets function to get the list of matching files. So, if it enters a loop, it is the fault of that function.
I 'll have to test this and try to write a replacement function.

BigAngryDog:
>are you talking about the find-in-files functionality when used with a custom filemask?

Yep. That's the one. :)

Find in files with the specify "Search Path" option.

Navigation

[0] Message Index

Go to full version