change game to app
This commit is contained in:
parent
fd773f5832
commit
a8335a0e89
7 changed files with 30 additions and 32 deletions
|
|
@ -4,7 +4,7 @@ const path = require('path')
|
|||
const { DIRS, readJson, writeJson } = require('./paths')
|
||||
const { prefixPath } = require('./prefixes')
|
||||
|
||||
const REGISTRY = path.join(DIRS.DATA, 'games.json')
|
||||
const REGISTRY = path.join(DIRS.DATA, 'apps.json')
|
||||
const SETTINGS = path.join(DIRS.DATA, 'settings.json')
|
||||
|
||||
function loadGames() {
|
||||
|
|
@ -40,7 +40,7 @@ function removeGame(id) {
|
|||
const idx = games.findIndex(g => g.id === id)
|
||||
if (idx === -1) return false
|
||||
const g = games[idx]
|
||||
if (g.imported && g.path && g.path.startsWith(DIRS.GAMES)) {
|
||||
if (g.imported && g.path && g.path.startsWith(DIRS.APPS)) {
|
||||
try {
|
||||
require('fs').rmSync(g.path, { recursive: true, force: true })
|
||||
} catch {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue