Author Topic: Suggestion - File Searching & Circular Links  (Read 3435 times)

Offline BigAngryDog

  • Multiple posting newcomer
  • *
  • Posts: 75
    • BigAngryDog.com
Suggestion - File Searching & Circular Links
« on: December 06, 2006, 12:05:08 pm »
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.

BigAngryDog.com

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Suggestion - File Searching & Circular Links
« Reply #1 on: December 06, 2006, 02:07:53 pm »
What do you mean by circular links? When does C::B hang?
Please post some more info...
Be patient!
This bug will be fixed soon...

Offline BigAngryDog

  • Multiple posting newcomer
  • *
  • Posts: 75
    • BigAngryDog.com
Re: Suggestion - File Searching & Circular Links
« Reply #2 on: December 06, 2006, 04:48:40 pm »
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)

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
BigAngryDog.com

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Suggestion - File Searching & Circular Links
« Reply #3 on: December 06, 2006, 05:39:25 pm »
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.
Be patient!
This bug will be fixed soon...

Offline BigAngryDog

  • Multiple posting newcomer
  • *
  • Posts: 75
    • BigAngryDog.com
Re: Suggestion - File Searching & Circular Links
« Reply #4 on: December 06, 2006, 07:13:13 pm »
>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.
BigAngryDog.com