fixes
This commit is contained in:
		
							parent
							
								
									f2f8276b9d
								
							
						
					
					
						commit
						fa5d8467a7
					
				@ -54,17 +54,21 @@ if getSettingAsBool('custom_version'):
 | 
			
		||||
else:
 | 
			
		||||
    platform['version'] = default_path
 | 
			
		||||
 | 
			
		||||
if not os.path.exists(os.path.join(os.path.dirname(__file__), platform['system'], platform['version'])):
 | 
			
		||||
    log('set_version: back to default '+default_path)
 | 
			
		||||
sizefile_path = os.path.join(os.path.dirname(__file__), platform['system'], platform['version'])
 | 
			
		||||
if not os.path.exists(sizefile_path):
 | 
			
		||||
    log('set_version: no sizefile at %s back to default %s' % (sizefile_path, default_path))
 | 
			
		||||
    platform['version'] = default_path
 | 
			
		||||
if not os.path.exists(os.path.join(os.path.dirname(__file__), platform['system'], platform['version'])):
 | 
			
		||||
    log('set_version: no default searching for any version')
 | 
			
		||||
    versions = os.listdir(os.path.join(os.path.dirname(__file__), platform['system'],))
 | 
			
		||||
    sizefile_path = os.path.join(os.path.dirname(__file__), platform['system'], platform['version'])
 | 
			
		||||
    if not os.path.exists(sizefile_path):
 | 
			
		||||
        log('set_version: no default at %s searching for any version' % sizefile_path)
 | 
			
		||||
        versions = os.listdir(os.path.join(os.path.dirname(__file__), platform['system']))
 | 
			
		||||
        for ver in versions:
 | 
			
		||||
        if not os.path.isdir(os.path.join(os.path.dirname(__file__), platform['system'],ver)):
 | 
			
		||||
            if not os.path.isdir(os.path.join(os.path.dirname(__file__), platform['system'], ver)):
 | 
			
		||||
                versions.remove(ver)
 | 
			
		||||
 | 
			
		||||
        if len(versions)>0:
 | 
			
		||||
            platform['version'] = versions[-1]
 | 
			
		||||
            log('set_version: chose %s out of %s' % (platform['version'], str(versions)))
 | 
			
		||||
        else:
 | 
			
		||||
            log('die because the folder is empty')
 | 
			
		||||
            exit()
 | 
			
		||||
 | 
			
		||||
@ -23,8 +23,8 @@
 | 
			
		||||
	<string id="1150">0.16.19</string>
 | 
			
		||||
	<string id="1151">1.0.6</string>
 | 
			
		||||
	<string id="1152">1.0.7</string>
 | 
			
		||||
	<string id="1152">1.0.8</string>
 | 
			
		||||
	<string id="1152">1.0.9</string>
 | 
			
		||||
	<string id="1153">1.0.8</string>
 | 
			
		||||
	<string id="1154">1.0.9</string>
 | 
			
		||||
	
 | 
			
		||||
	<string id="1010">TS Engine not running!</string>
 | 
			
		||||
	<string id="1011">No answer</string>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user