From 0e8d95c6186e1ddca8536a95f240706fae5dfe78 Mon Sep 17 00:00:00 2001 From: Josh Yelon Date: Fri, 25 Feb 2005 21:49:55 +0000 Subject: [PATCH] Fix bug that I just introduced --- doc/makepanda/makepanda.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/makepanda/makepanda.py b/doc/makepanda/makepanda.py index fba717af01..b17dd387f8 100755 --- a/doc/makepanda/makepanda.py +++ b/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) ########################################################################