Skip to content

Commit

Permalink
fix jar caching forcing default textures (caused by 183da12)
Browse files Browse the repository at this point in the history
  • Loading branch information
agrif committed May 10, 2014
1 parent 8881ba6 commit 95de300
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions overviewer_core/textures.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,6 @@ def search_dir(base):
return None
if verbose: logging.info('search_zip_paths: ' + ', '.join(search_zip_paths))

# we've sucessfully loaded something from here before, so let's quickly try
# this before searching again
if self.jar is not None:
for jarfilename in search_zip_paths:
try:
self.jar.getinfo(jarfilename)
if verbose: logging.info("Found (cached) %s in '%s'", jarfilename, self.jarpath)
return self.jar.open(jarfilename)
except (KeyError, IOError), e:
pass

# A texture path was given on the command line. Search this location
# for the file first.
if self.find_file_local_path:
Expand Down Expand Up @@ -227,6 +216,17 @@ def search_dir(base):
if verbose: logging.info("Did not find the file in overviewer executable directory")
if verbose: logging.info("Looking for installed minecraft jar files...")

# we've sucessfully loaded something from here before, so let's quickly try
# this before searching again
if self.jar is not None:
for jarfilename in search_zip_paths:
try:
self.jar.getinfo(jarfilename)
if verbose: logging.info("Found (cached) %s in '%s'", jarfilename, self.jarpath)
return self.jar.open(jarfilename)
except (KeyError, IOError), e:
pass

# Find an installed minecraft client jar and look in it for the texture
# file we need.
versiondir = ""
Expand Down

0 comments on commit 95de300

Please sign in to comment.