Login | Register
My pages Projects Community openCollabNet

Discussions > dev > ignore globbing patterns are not anchored

fsvs
Discussion topic

Back to topic list

ignore globbing patterns are not anchored

Author Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Full name Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de>
Date 2006-10-10 14:48:18 PDT
Message Hi!

The pseudo-globbing-patterns fsvs uses to ignore files are not anchored to
the end of the string when they are compiled into PCR expressions.

This causes a pattern like "./**.o" not only to ignore aall object files,
as at least I had expected, but any file which contains the
substring ".o" somewhere in its full file or directory name. ie. it will
exclude all OpenDocument files and everything inside the
directory "my.o.my", for example.

As the manual does not mention this at all and there is no privision to
achor a globbing paattern explicitely, I think this is a bug.

I think something like the attached patch could fix that, but
unfortunately I could not even compile test it as for some reason fsvs
does not like to build in my system at the moment. Running Debian SID I
probably messed something up recently... :-/

Greetings,

  Gunter


--- fsvs-1.0.13/src/ignore.c 2006-08-22 19:30:52.000000000 +0200
+++ fsvs-1.0.13_mod/src/ignore.c 2006-10-10 23:45:58.000000000
+0200
@@ -159,9 +159,10 @@
                                        "not enough space in buffer");
                } while (*src);

+ *dest++='$';
                *dest=0;
                /* return unused space */
- buffer=realloc(buffer, dest-buffer+2);
+ buffer=realloc(buffer, dest-buffer+3);
                STOPIF_ENOMEM(!buffer);
                ignore->compare_s​tring=buffer;
                dest=buffer;

--
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
"The thing is that Mr. Dibbler can even sell sausages to people who have
bought them off him *before*." -- (Terry Pratchett, Moving
Pictures)
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
+ PGP-verschl├╝sselte Mails bevorzugt! +
+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+-+-+-+-​+-+-+-+-+-+-+
Attachments

« Previous message in topic | 1 of 11 | Next message in topic »

Messages

Show all messages in topic

ignore globbing patterns are not anchored Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2006-10-10 14:48:18 PDT
     Re: ignore globbing patterns are not anchored pmarek P.Marek 2006-10-11 08:19:37 PDT
         Re: ignore globbing patterns are not anchored Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2006-10-13 12:15:41 PDT
             Re: ignore globbing patterns are not anchored pmarek P.Marek 2006-10-14 23:24:03 PDT
                 Re: ignore globbing patterns are not anchored Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2006-10-15 08:03:09 PDT
                 Re: ignore globbing patterns are not anchored Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2006-10-26 09:56:29 PDT
                     Re: ignore globbing patterns are not anchored pmarek P.Marek 2006-10-27 04:46:45 PDT
                         Re: ignore globbing patterns are not anchored pmarek P.Marek 2006-10-27 05:13:19 PDT
                         Re: ignore globbing patterns are not anchored Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2006-10-27 12:38:18 PDT
                     Re: ignore globbing patterns are not anchored pmarek P.Marek 2006-10-27 05:13:19 PDT
                         Re: ignore globbing patterns are not anchored Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> Gunter Ohrner <G dot Ohrner at post dot rwth-aachen dot de> 2006-10-27 12:41:41 PDT
Messages per page: