Skip to content

Commit

Permalink
Fix error copying empty member
Browse files Browse the repository at this point in the history
  • Loading branch information
sebjulliand authored and chrjorgensen committed Feb 24, 2024
2 parents b22f840 + eb76946 commit 4fd5e9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/api/IBMiContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class IBMiContent {
}

/**
*
*
* @param remotePath Remote IFS path
* @param localPath Local path to download file to
*/
Expand Down Expand Up @@ -103,7 +103,7 @@ export default class IBMiContent {
}

/**
* @param originalPath
* @param originalPath
* @param content Raw content
* @param encoding Optional encoding to write.
*/
Expand Down Expand Up @@ -249,7 +249,7 @@ export default class IBMiContent {
* Run SQL statements.
* Each statement must be separated by a semi-colon and a new line (i.e. ;\n).
* If a statement starts with @, it will be run as a CL command.
*
*
* @param statements
* @returns a Result set
*/
Expand All @@ -259,7 +259,7 @@ export default class IBMiContent {
if (QZDFMDB2) {
if (this.chgJobCCSID === undefined) {
this.chgJobCCSID = (this.ibmi.qccsid < 1 || this.ibmi.qccsid === 65535) && this.ibmi.defaultCCSID > 0 ? `@CHGJOB CCSID(${this.ibmi.defaultCCSID});\n` : '';
}
}

const output = await this.ibmi.sendCommand({
command: `LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"`,
Expand Down Expand Up @@ -491,7 +491,7 @@ export default class IBMiContent {
const type = filters.types && filters.types.length === 1 && filters.types[0] !== '*' ? filters.types[0] : '*ALL';

const sourceFilesOnly = filters.types && filters.types.length === 1 && filters.types.includes(`*SRCPF`);
const withSourceFiles = ['*ALL', '*SRCPF'].includes(type);
const withSourceFiles = ['*ALL', '*SRCPF', '*FILE'].includes(type);

const queries: string[] = [];

Expand Down Expand Up @@ -851,7 +851,7 @@ export default class IBMiContent {
}

/**
*
*
* @param command Optionally qualified CL command
* @param parameters A key/value object of parameters
* @returns Formatted CL string
Expand Down
2 changes: 1 addition & 1 deletion src/views/objectBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ export function initializeObjectBrowser(context: vscode.ExtensionContext) {
})

const copyMessages = Tools.parseMessages(copyResult.stderr);
if (copyMessages.messages.length && !copyMessages.findId(`CPF2869`)) {
if (copyResult.code !== 0 && copyMessages.messages.length && !(copyMessages.findId(`CPF2869`) && copyMessages.findId(`CPF2817`))) {
throw (copyResult.stderr)
}

Expand Down

0 comments on commit 4fd5e9f

Please sign in to comment.