mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 16:53:57 +00:00
Fix: using node:fs instead of fs
This commit is contained in:
@@ -59,7 +59,7 @@ const removeGameFromLibrary = async (
|
||||
}
|
||||
|
||||
if (assetPathsToDelete.length > 0) {
|
||||
const fs = await import("fs");
|
||||
const fs = await import("node:fs");
|
||||
for (const assetPath of assetPathsToDelete) {
|
||||
try {
|
||||
if (fs.existsSync(assetPath)) {
|
||||
|
||||
@@ -58,7 +58,7 @@ const updateCustomGame = async (
|
||||
}
|
||||
|
||||
if (oldAssetPaths.length > 0) {
|
||||
const fs = await import("fs");
|
||||
const fs = await import("node:fs");
|
||||
for (const assetPath of oldAssetPaths) {
|
||||
try {
|
||||
if (fs.existsSync(assetPath)) {
|
||||
|
||||
@@ -51,14 +51,14 @@ const updateGameCustomAssets = async (
|
||||
if (existingAssets) {
|
||||
const updatedAssets = {
|
||||
...existingAssets,
|
||||
title,
|
||||
title,
|
||||
};
|
||||
|
||||
await gamesShopAssetsSublevel.put(gameKey, updatedAssets);
|
||||
}
|
||||
|
||||
if (oldAssetPaths.length > 0) {
|
||||
const fs = await import("fs");
|
||||
const fs = await import("node:fs");
|
||||
for (const assetPath of oldAssetPaths) {
|
||||
try {
|
||||
if (fs.existsSync(assetPath)) {
|
||||
|
||||
Reference in New Issue
Block a user