mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-25 23:00:13 +00:00
Make lastver a dotfile to keep it hidden
This commit is contained in:
parent
d09f06fb26
commit
33be67f7e9
@ -100,12 +100,13 @@ function setGameInfo(serverUUID) {
|
|||||||
var cachedir = userdir + '\\..\\..\\LocalLow\\Unity\\Web Player\\Cache';
|
var cachedir = userdir + '\\..\\..\\LocalLow\\Unity\\Web Player\\Cache';
|
||||||
var curversion = cachedir + '\\Fusionfall';
|
var curversion = cachedir + '\\Fusionfall';
|
||||||
var newversion = cachedir + '\\' + gameversion.name;
|
var newversion = cachedir + '\\' + gameversion.name;
|
||||||
|
var record = userdir + '\\.lastver';
|
||||||
|
|
||||||
if (remotefs.existsSync(curversion)) {
|
if (remotefs.existsSync(curversion)) {
|
||||||
// cache already exists
|
// cache already exists
|
||||||
// find out what version it belongs to
|
// find out what version it belongs to
|
||||||
if (remotefs.existsSync(userdir + '\\lastver')) {
|
if (remotefs.existsSync(record)) {
|
||||||
var lastversion = remotefs.readFileSync(userdir + '\\lastver');
|
var lastversion = remotefs.readFileSync(record);
|
||||||
remotefs.renameSync(curversion, cachedir + '\\' + lastversion);
|
remotefs.renameSync(curversion, cachedir + '\\' + lastversion);
|
||||||
console.log('Cached version ' + lastversion);
|
console.log('Cached version ' + lastversion);
|
||||||
} else {
|
} else {
|
||||||
@ -122,7 +123,7 @@ function setGameInfo(serverUUID) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// make note of what version we are launching for next launch
|
// make note of what version we are launching for next launch
|
||||||
remotefs.writeFileSync(userdir + '\\lastver', gameversion.name);
|
remotefs.writeFileSync(record, gameversion.name);
|
||||||
|
|
||||||
window.asseturl = gameversion.url; // gameclient.js needs to access this
|
window.asseturl = gameversion.url; // gameclient.js needs to access this
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user