Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/api/IBMiContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,14 @@ export default class IBMiContent {
async getObjectList(filters: { library: string; object?: string; types?: string[]; filterType?: FilterType }, sortOrder?: SortOrder): Promise<IBMiObject[]> {
const localLibrary = this.ibmi.upperCaseName(filters.library);

// Libraries (*LIB) can only be listed from QSYS
const isListingLibraries = filters.types && filters.types.length > 0 && filters.types.some(type => type === '*LIB');
Comment thread
mounigopisetti1162 marked this conversation as resolved.
Outdated

if (isListingLibraries && localLibrary !== `QSYS`) {
// Return empty array when trying to list libraries from non-QSYS library
return [];
}

if (localLibrary !== `QSYS`) {
if (!await this.checkObject({ library: "QSYS", name: localLibrary, type: "*LIB" })) {
throw new Error(`Library ${localLibrary} does not exist.`);
Expand Down
Loading