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