Fixed a client bug
This commit is contained in:
parent
edff7d4014
commit
c94b94c508
2
github
2
github
|
@ -1 +1 @@
|
||||||
Subproject commit 90d3a6c84c003ab42a3ecfb5197b9368897862b1
|
Subproject commit a46f54984b7ad9721c01273e77807469cd2c63a9
|
|
@ -124,4 +124,4 @@ function deploy_client() {
|
||||||
#compile_scripts
|
#compile_scripts
|
||||||
#compile_native
|
#compile_native
|
||||||
package_client
|
package_client
|
||||||
#deploy_client
|
deploy_client
|
||||||
|
|
|
@ -21,6 +21,11 @@ export class ClientStorageAdapter implements StorageAdapter {
|
||||||
const result = await fs.readFile(storageKeyPath(key));
|
const result = await fs.readFile(storageKeyPath(key));
|
||||||
return JSON.parse(result.toString());
|
return JSON.parse(result.toString());
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
if(error.code === "ENOENT") {
|
||||||
|
/* The file does not exists */
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
logError(LogCategory.GENERAL, tr("Failed to load client storage key %s: %o"), key, error);
|
logError(LogCategory.GENERAL, tr("Failed to load client storage key %s: %o"), key, error);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,14 @@ export class ClientUpdater implements Updater {
|
||||||
}
|
}
|
||||||
|
|
||||||
getLastUsedVersion(): string {
|
getLastUsedVersion(): string {
|
||||||
return settings.getValue(Settings.KEY_UPDATER_LAST_USED_CLIENT, undefined);
|
const result = settings.getValue(Settings.KEY_UPDATER_LAST_USED_CLIENT, undefined);
|
||||||
|
if(result === undefined) {
|
||||||
|
/* We never have executed the client */
|
||||||
|
this.updateUsedVersion();
|
||||||
|
return this.getCurrentVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateUsedVersion() {
|
updateUsedVersion() {
|
||||||
|
|
|
@ -15,7 +15,7 @@ using namespace std;
|
||||||
return GetBinaryTypeA(file.c_str(), lpBinaryType);
|
return GetBinaryTypeA(file.c_str(), lpBinaryType);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID execute_app(LPCTSTR lpApplicationName,LPSTR arguments)
|
void execute_app(LPCTSTR lpApplicationName,LPSTR arguments)
|
||||||
{
|
{
|
||||||
// additional information
|
// additional information
|
||||||
STARTUPINFO si;
|
STARTUPINFO si;
|
||||||
|
@ -32,7 +32,7 @@ using namespace std;
|
||||||
nullptr, // Process handle not inheritable
|
nullptr, // Process handle not inheritable
|
||||||
nullptr, // Thread handle not inheritable
|
nullptr, // Thread handle not inheritable
|
||||||
FALSE, // Set handle inheritance to FALSE
|
FALSE, // Set handle inheritance to FALSE
|
||||||
CREATE_NEW_CONSOLE , // No creation flags
|
CREATE_DEFAULT_ERROR_MODE | CREATE_NEW_CONSOLE , // No creation flags
|
||||||
nullptr, // Use parent's environment block
|
nullptr, // Use parent's environment block
|
||||||
nullptr, // Use parent's starting directory
|
nullptr, // Use parent's starting directory
|
||||||
&si, // Pointer to STARTUPINFO structure
|
&si, // Pointer to STARTUPINFO structure
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"crash_handler": "electron . crash-handler",
|
"crash_handler": "electron . crash-handler",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"start-download-dev": "electron . --disable-hardware-acceleration --gdb --debug --updater-ui-loader_type=0 -t -u https://clientapi.teaspeak.dev/",
|
"start-download-dev": "electron . --disable-hardware-acceleration --gdb --debug -t -u https://clientapi.teaspeak.dev/",
|
||||||
"start-s": "electron . --disable-hardware-acceleration --gdb --debug --updater-ui-loader_type=3 --updater-ui-ignore-version -t -u http://localhost:8080/",
|
"start-s": "electron . --disable-hardware-acceleration --gdb --debug --updater-ui-loader_type=3 --updater-ui-ignore-version -t -u http://localhost:8080/",
|
||||||
"dtest": "electron . dtest",
|
"dtest": "electron . dtest",
|
||||||
"sass": "sass",
|
"sass": "sass",
|
||||||
|
|
Loading…
Reference in New Issue