Skip to content

Commit

Permalink
Also filter some well-known files created by C/C++ build systems
Browse files Browse the repository at this point in the history
GNU Autotools often creates files called .lo, .Plo. C/C++ compilers
create object files ending with .o, and shared objects ending in .so,
as well as static libraries ending with .a.
  • Loading branch information
kov committed Mar 25, 2012
1 parent 8952a96 commit 9217acc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions snapopen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,10 @@ def on_snapopen_action( self ):

# cache the file list in the background
#modify lines below as needed, these defaults work pretty well
imagefilter = " ! -iname '*.jpg' ! -iname '*.jpeg' ! -iname '*.gif' ! -iname '*.png' ! -iname '*.psd' ! -iname '*.tif' ! -iname '*.pyc' "
imagefilter = " ! -iname '*.jpg' ! -iname '*.jpeg' ! -iname '*.gif' ! -iname '*.png' ! -iname '*.psd' ! -iname '*.tif' "
dirfilter = " ! -path '*.svn*' ! -path '*.git*' "
os.popen("cd %s; find . -type f %s > %s 2> /dev/null &" % (self._rootdir.replace("file://", ""), imagefilter + dirfilter, self._tmpfile))
binfilter = " ! -iname '*.o' ! -iname '*.so' ! -iname '*.lo' ! -iname '*.Plo' ! -iname '*.a' ! -iname '*.pyc' "
os.popen("cd %s; find . -type f %s > %s 2> /dev/null &" % (self._rootdir.replace("file://", ""), imagefilter + dirfilter + binfilter, self._tmpfile))

self._snapopen_window.show()
self._glade_entry_name.select_region(0,-1)
Expand Down

0 comments on commit 9217acc

Please sign in to comment.