Skip to content

Commit

Permalink
Search for backends in more directories
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Feb 4, 2024
1 parent 0fd6b46 commit 3fa0f4e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion kfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,16 @@ if (plugin) {
else if (platform === Platform.PS5) {
backend = 'PlayStation5'
}
const pluginPath = path.join(__dirname, '..', 'Backends', backend);

let ancestor = project;
while (ancestor.parent != null) {
ancestor = ancestor.parent;
}

let pluginPath = path.join(ancestor.basedir, 'Backends', backend);
if (!fs.existsSync(pluginPath)) {
pluginPath = path.join(__dirname, '..', 'Backends', backend);
}
if (!fs.existsSync(pluginPath)) {
log.error('Was looking for a backend in ' + pluginPath + ' but it wasn\'t there.');
throw 'backend not found';
Expand Down

0 comments on commit 3fa0f4e

Please sign in to comment.