On Sun, Dec 05, 2010 at 09:25:57PM +0000, Roger Leigh wrote: > So, we could get away with a really simple regex: > > static regex file_namespace("^[^:/,.][^:/,]*$"); > static regex debian_dpkg_conffile_cruft("dpkg-(old|dist|new|tmp)$"); > > if (regex_search(name, file_namespace) && > !regex_search(name, debian_dpkg_conffile_cruft)) { > match = true; > }
Actually, this is too simple. We do need to also avoid editor backups of various types. We're already avoiding any beginning with '.'. We should also ban a trailing '~'. Any others? Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
signature.asc
Description: Digital signature