refactor(server/utils): simplify getResourceDir

get rid of unnecessary else branch here
This commit is contained in:
Panagiotis Papadopoulos 2025-01-31 21:55:37 +01:00
parent 6e5e6989ed
commit a4ce2ddd5e

View File

@ -280,11 +280,8 @@ export function envToBoolean(val: string | undefined) {
* @returns the resource dir. * @returns the resource dir.
*/ */
export function getResourceDir() { export function getResourceDir() {
if (isElectron && !isDev) { if (isElectron && !isDev) return process.resourcesPath;
return process.resourcesPath; return join(dirname(fileURLToPath(import.meta.url)), "..", "..");
} else {
return join(dirname(fileURLToPath(import.meta.url)), "..", "..");
}
} }
export default { export default {