gentree: fix typo in ignore list handling
authorJohannes Berg <johannes.berg@intel.com>
Tue, 16 Apr 2013 12:20:00 +0000 (14:20 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 16 Apr 2013 12:20:00 +0000 (14:20 +0200)
We don't want to compare the second-to-last letter with a
two-character string, that'll never be true anyway ... It
should compare the last two letters.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
gentree.py

index 3ba73eaf1fc06cf026e2ce7083bd40e16a782243..5ae88706eaef6bbb77ab36d0c6a91a51ad1319be 100755 (executable)
@@ -137,7 +137,7 @@ def copy_files(srcpath, copy_list, outdir):
             def copy_ignore(dir, entries):
                 r = []
                 for i in entries:
-                    if i[-2] == '.o' or i[-1] == '~':
+                    if i[-2:] == '.o' or i[-1] == '~':
                         r.append(i)
                 return r
             copytree(os.path.join(srcpath, srcitem),