Browse Source

Fix bug that I just introduced

Josh Yelon 21 years ago
parent
commit
0e8d95c618
1 changed files with 2 additions and 1 deletions
  1. 2 1
      doc/makepanda/makepanda.py

+ 2 - 1
doc/makepanda/makepanda.py

@@ -1071,10 +1071,11 @@ def CopyFile(dstfile,srcfile):
 ########################################################################
 
 def CopyAllFiles(dstdir,srcdir,suffix=""):
+    suflen = len(suffix)
     files = os.listdir(srcdir)
     for x in files:
         if (os.path.isfile(srcdir+x)):
-            if x[-len(suffix):] == suffix:
+            if (suflen==0) or (x[-suflen:]==suffix):
                 CopyFile(dstdir+x, srcdir+x)
 
 ########################################################################