From 996b299c79bf424be1649795cd3b2d63f8f5e301 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Fri, 28 Oct 2011 21:56:48 -0400 Subject: [PATCH] On map shrink, delete top files to ensure they get regen'd --- overviewer_core/quadtree.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/overviewer_core/quadtree.py b/overviewer_core/quadtree.py index cf3adcb..8047ad3 100644 --- a/overviewer_core/quadtree.py +++ b/overviewer_core/quadtree.py @@ -187,7 +187,15 @@ class QuadtreeGen(object): os.rename(getpath("3", "0"), getpath("new3")) shutil.rmtree(getpath("3")) os.rename(getpath("new3"), getpath("3")) - + + # Delete the files in the top directory to make sure they get re-created. + files = [str(num)+"."+self.imgformat for num in xrange(4)] + ["base." + self.imgformat] + for f in files: + try: + os.unlink(getpath(f)) + except OSError, e: + pass # doesn't exist maybe? + def go(self, procs): """Processing before tile rendering"""