Skip to content

Commit

Permalink
Change how ASP is grabbed
Browse files Browse the repository at this point in the history
Signed-off-by: worksofliam <[email protected]>
  • Loading branch information
worksofliam committed Feb 12, 2025
1 parent b50f23e commit 0b6799c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/api/IBMiContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,6 @@ export default class IBMiContent {
`;
const results = await this.ibmi.runSQL(statement);

const asp = this.ibmi.getIAspName(Number(results[0]?.IASP_NUMBER));

objects = results.map(object => ({
library: 'QSYS',
name: this.ibmi.sysNameInLocal(String(object.NAME)),
Expand All @@ -367,7 +365,7 @@ export default class IBMiContent {
changed: new Date(Number(object.CHANGED)),
created_by: object.CREATED_BY,
owner: object.OWNER,
asp
asp: this.ibmi.getIAspName(Number(object.IASP_NUMBER))
} as IBMiObject));
} else {
let results = await this.getQTempTable(libraries.map(library => `@DSPOBJD OBJ(QSYS/${library}) OBJTYPE(*LIB) DETAIL(*TEXTATR) OUTPUT(*OUTFILE) OUTFILE(QTEMP/LIBLIST) OUTMBR(*FIRST *ADD)`), "LIBLIST");
Expand Down Expand Up @@ -579,8 +577,6 @@ export default class IBMiContent {

const objects = (await this.runStatements(createOBJLIST.join(`\n`)));

const asp = this.ibmi.getIAspName(Number(objects[0]?.IASP_NUMBER));

return objects.map(object => ({
library: localLibrary,
name: Boolean(object.IS_SOURCE) ? this.ibmi.sysNameInLocal(String(object.NAME)) : String(object.NAME),
Expand Down
3 changes: 1 addition & 2 deletions src/filesystems/qsys/QSysFs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ export class QSysFS implements vscode.FileSystemProvider {

async getMemberAttributes(connection: IBMi, path: QsysPath & { member?: string }) {
path.asp = path.asp || await connection.lookupLibraryIAsp(path.library);
let attributes = await connection.getContent().getAttributes(path, "CREATE_TIME", "MODIFY_TIME", "DATA_SIZE");
return attributes;
return await connection.getContent().getAttributes(path, "CREATE_TIME", "MODIFY_TIME", "DATA_SIZE");
}

parseMemberPath(connection: IBMi, path: string) {
Expand Down

0 comments on commit 0b6799c

Please sign in to comment.