mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 13:56:16 +00:00
fix: lastTimePlayed not updating correctly when merging games
This commit is contained in:
@@ -80,7 +80,7 @@ export class CloudSync {
|
||||
try {
|
||||
await fs.promises.rm(backupPath, { recursive: true });
|
||||
} catch (error) {
|
||||
logger.error("Failed to remove backup path", error);
|
||||
logger.error("Failed to remove backup path", { backupPath, error });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ export class CloudSync {
|
||||
try {
|
||||
await fs.promises.unlink(bundleLocation);
|
||||
} catch (error) {
|
||||
logger.error("Failed to remove tar file", error);
|
||||
logger.error("Failed to remove tar file", { bundleLocation, error });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@ export const mergeWithRemoteGames = async () => {
|
||||
const updatedLastTimePlayed =
|
||||
localGame.lastTimePlayed == null ||
|
||||
(game.lastTimePlayed &&
|
||||
new Date(game.lastTimePlayed) > localGame.lastTimePlayed)
|
||||
new Date(game.lastTimePlayed) >
|
||||
new Date(localGame.lastTimePlayed))
|
||||
? game.lastTimePlayed
|
||||
: localGame.lastTimePlayed;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user