From 5343fa09691b152db995ad466d8ddfb8417f0d01 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 20 Jul 2009 08:17:27 +0000 Subject: [PATCH] Backup dependency cache to save frustration when you accidentally hit a wrong option --- makepanda/makepandacore.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index e072b49498..0e434b5470 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -319,6 +319,11 @@ def CxxGetIncludes(path): ######################################################################## def SaveDependencyCache(): + try: + if (os.path.exists(os.path.join(OUTPUTDIR, "tmp", "makepanda-dcache"))): + os.rename(os.path.join(OUTPUTDIR, "tmp", "makepanda-dcache-backup"), + os.path.join(OUTPUTDIR, "tmp", "makepanda-dcache")) + except: pass try: icache = open(os.path.join(OUTPUTDIR, "tmp", "makepanda-dcache"),'wb') except: icache = 0 if (icache!=0):