Skip to content

Commit

Permalink
Fix object resolve with variant characters
Browse files Browse the repository at this point in the history
  • Loading branch information
chrjorgensen committed Mar 20, 2024
1 parent 0a4b889 commit f9b7a04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/IBMiContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ export default class IBMiContent {
}

async objectResolve(object: string, libraries: string[]): Promise<string | undefined> {
const command = `for f in ${libraries.map(lib => `/QSYS.LIB/${this.ibmi.upperCaseName(lib)}.LIB/${this.ibmi.upperCaseName(object)}.*`).join(` `)}; do if [ -f $f ] || [ -d $f ]; then echo $f; break; fi; done`;
const command = `for f in ${libraries.map(lib => `/QSYS.LIB/${this.ibmi.sysNameInAmerican(lib)}.LIB/${this.ibmi.sysNameInAmerican(object)}.*`).join(` `)}; do if [ -f $f ] || [ -d $f ]; then echo $f; break; fi; done`;

const result = await this.ibmi.sendCommand({
command,
Expand All @@ -832,7 +832,7 @@ export default class IBMiContent {
const firstMost = result.stdout;

if (firstMost) {
const lib = Tools.unqualifyPath(firstMost);
const lib = this.ibmi.sysNameInLocal(Tools.unqualifyPath(firstMost));

return lib.split('/')[1];
}
Expand Down

0 comments on commit f9b7a04

Please sign in to comment.