mirror of
https://github.com/OpenFusionProject/Client.git
synced 2025-10-22 07:00:07 +00:00
Compare commits
4 Commits
3fc6cabe33
...
1.5.1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ec0fc87dcd | ||
![]() |
cef8c1de93 | ||
![]() |
b73329c6de | ||
![]() |
2e7dc51aa1 |
@@ -48,7 +48,7 @@ function setAppVersionText() {
|
||||
}
|
||||
|
||||
function addServer() {
|
||||
var jsonToModify = remotefs.readJsonSync(serversPath);
|
||||
var jsonToModify = JSON.parse(remotefs.readFileSync(serversPath));
|
||||
|
||||
var server = {};
|
||||
server["uuid"] = uuidv4();
|
||||
@@ -70,7 +70,7 @@ function addServer() {
|
||||
}
|
||||
|
||||
function editServer() {
|
||||
var jsonToModify = remotefs.readJsonSync(serversPath);
|
||||
var jsonToModify = JSON.parse(remotefs.readFileSync(serversPath));
|
||||
$.each(jsonToModify["servers"], function (key, value) {
|
||||
if (value["uuid"] == getSelectedServer()) {
|
||||
value["description"] =
|
||||
@@ -92,7 +92,7 @@ function editServer() {
|
||||
}
|
||||
|
||||
function deleteServer() {
|
||||
var jsonToModify = remotefs.readJsonSync(serversPath);
|
||||
var jsonToModify = JSON.parse(remotefs.readFileSync(serversPath));
|
||||
var result = jsonToModify["servers"].filter(function (obj) {
|
||||
return obj.uuid === getSelectedServer();
|
||||
})[0];
|
||||
@@ -166,10 +166,6 @@ function performCacheSwap(newVersion) {
|
||||
var currentCache = path.join(cacheRoot, "FusionFall");
|
||||
var newCache = path.join(cacheRoot, newVersion);
|
||||
var record = path.join(userData, ".lastver");
|
||||
var lastVersion = remotefs.readFileSync(record, (encoding = "utf8"));
|
||||
|
||||
// Make note of what version we are launching for next launch
|
||||
remotefs.writeFileSync(record, newVersion);
|
||||
|
||||
// If cache renaming would result in a no-op (ex. launching the same version
|
||||
// two times), then skip it. This avoids permissions errors with multiple clients
|
||||
@@ -179,6 +175,7 @@ function performCacheSwap(newVersion) {
|
||||
if (remotefs.existsSync(currentCache)) {
|
||||
// Cache already exists, find out what version it belongs to
|
||||
if (remotefs.existsSync(record)) {
|
||||
var lastVersion = remotefs.readFileSync(record, (encoding = "utf8"));
|
||||
if (lastVersion != newVersion) {
|
||||
// Remove the directory we're trying to store the
|
||||
// existing cache to if it already exists for whatever
|
||||
@@ -198,6 +195,9 @@ function performCacheSwap(newVersion) {
|
||||
}
|
||||
}
|
||||
|
||||
// Make note of what version we are launching for next launch
|
||||
remotefs.writeFileSync(record, newVersion);
|
||||
|
||||
if (remotefs.existsSync(newCache) && !skip) {
|
||||
// Rename saved cache to FusionFall
|
||||
remotefs.renameSync(newCache, currentCache);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"autoupdate-check": true,
|
||||
"cache-swapping": true,
|
||||
"last-version-initialized": "1.4"
|
||||
"last-version-initialized": "1.5"
|
||||
}
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "OpenFusionClient",
|
||||
"version": "1.4.1",
|
||||
"version": "1.5.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "OpenFusionClient",
|
||||
"version": "1.4.1",
|
||||
"version": "1.5.1",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "OpenFusionClient",
|
||||
"version": "1.4.3",
|
||||
"version": "1.5.1",
|
||||
"description": "OpenFusionClient",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
Reference in New Issue
Block a user