Skip to content

Commit

Permalink
Simple fix for always escaping the path
Browse files Browse the repository at this point in the history
Signed-off-by: worksofliam <[email protected]>
  • Loading branch information
worksofliam committed Oct 29, 2024
1 parent 7562569 commit b1b6eba
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 @@ -117,7 +117,7 @@ export default class IBMiContent {
ccsid = await this.getNotUTF8CCSID(features.attr, originalPath);
}

await writeFileAsync(tmpobj, content, encoding);
await writeFileAsync(tmpobj, content, {encoding: encoding as BufferEncoding});

if (ccsid && features.iconv) {
// Upload our file to the same temp file, then write convert it back to the original ccsid
Expand Down Expand Up @@ -952,7 +952,7 @@ export default class IBMiContent {
}

async getAttributes(path: string | (QsysPath & { member?: string }), ...operands: AttrOperands[]) {
const target = (path = typeof path === 'string' ? Tools.escapePath(path) : this.ibmi.sysNameInAmerican(Tools.qualifyPath(path.library, path.name, path.member, path.asp)));
const target = Tools.escapePath(path = typeof path === 'string' ? path : this.ibmi.sysNameInAmerican(Tools.qualifyPath(path.library, path.name, path.member, path.asp)));

const result = await this.ibmi.sendCommand({ command: `${this.ibmi.remoteFeatures.attr} -p ${target} ${operands.join(" ")}` });
if (result.code === 0) {
Expand Down

0 comments on commit b1b6eba

Please sign in to comment.