Skip to content
Permalink
Browse files
Fix findSimilarVer
  • Loading branch information
zam1024t committed Nov 20, 2018
1 parent 2734340 commit f9d8b0f65ee0a0cadef0bb5cd5c1af1a307e78ae
Showing with 3 additions and 3 deletions.
  1. +3 −3 Localize.py
@@ -62,7 +62,7 @@ def setLocale(locale, force = False):
d = os.path.join(mDir, version)
ld = os.path.join(d, locale)
if (not os.path.isdir(ld)) and getSetting('findSimilarVer', True):
sDir = findSimilarVer()
sDir = findSimilarVer(locale)
if not sDir:
return
d = os.path.join(mDir, sDir)
@@ -92,10 +92,10 @@ def getLink(locale):
locale = conf['link']
return locale

def findSimilarVer():
def findSimilarVer(locale):
sVer = 0
for item in os.listdir(mDir):
subDir = os.path.join(mDir, item)
subDir = os.path.join(mDir, item, locale)
if item.isdigit() and os.path.isdir(subDir):
int_item = int(item)
if int_item > sVer and int_item < int(version):

0 comments on commit f9d8b0f

Please sign in to comment.