[email protected]
[Top] [All Lists]

Re: Find File: Skip Directory matching a pattern

Subject: Re: Find File: Skip Directory matching a pattern
From: Nabil Sayegh
Date: Tue, 30 May 2006 21:06:44 +0200
Am Dienstag, 30. Mai 2006 18:12 schrieb Nabil Sayegh:
> I often search very large filesystems for a file and in many cases there
> are huge directories, that I would like to skip while searching.
[...]

Apparently there exists a variable "find_ignore_dirs" in the Misc section, but 
it seems like it only matches absolute paths:

                if (find_ignore_dirs){
                    int found;
                    char *temp_dir = g_strconcat (":", tmp, ":", (char *) 
NULL);

                    found = strstr (find_ignore_dirs, temp_dir) != 0;
                    g_free (temp_dir);
                    if (found)
                        g_free (tmp);
                    else
                        break;
                } else
                    break;

I attached a patch that changes find_ignore_dirs to be a regex instead of a 
colon delimited string. That way one may specify any pattern needed including 
absolute paths.
I used mc-4.6.1-2 from debian for the patch.

rgds
-- 
 Nabil Sayegh

Attachment: mc-4.6.1-find_ignore_dirs_regex.diff
Description: Text Data

_______________________________________________
Mc mailing list
http://mail.gnome.org/mailman/listinfo/mc
<Prev in Thread] Current Thread [Next in Thread>