Skip to content

Commit

Permalink
updated snapshots
Browse files Browse the repository at this point in the history
Signed-off-by: Pujal <[email protected]>
  • Loading branch information
pujal0909 committed Feb 5, 2025
1 parent 9911d18 commit bc51780
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ Destination: %s",
"message": "Member(s) downloaded successfully.
Destination: %s",
},
"membersContentTruncated": Object {
"message": "Member(s)' contents were truncated due to insufficient record lines. You can view the list of members here: %s",
},
"membersMatchedPattern": Object {
"message": "%d members(s) were found matching pattern.",
},
Expand Down
7 changes: 7 additions & 0 deletions packages/zosfiles/src/constants/ZosFiles.messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ export const ZosFilesMessages: { [key: string]: IMessageDefinition } = {
message: "Member(s) downloaded successfully.\nDestination: %s"
},

/**
* Message indicating that the members contents were truncated due to lrecl
* @type {IMessageDefinition}
*/
membersContentTruncated: {
message: "Member(s)' contents were truncated due to insufficient record lines. You can view the list of members here: %s"
},
/**
* Message indicating that the uss file was downloaded successfully
* @type {IMessageDefinition}
Expand Down
13 changes: 10 additions & 3 deletions packages/zosfiles/src/methods/copy/Copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,16 @@ export class Copy {
const uploadFileList: string[] = ZosFilesUtils.getFileListFromPath(downloadDir);

for (const file of uploadFileList) {
const uploadingDsn = `${toPds}(${ZosFilesUtils.generateMemberName(file)})`;
const uploadStream = IO.createReadStream(file);
await Upload.streamToDataSet(session, uploadStream, uploadingDsn);
const memName = ZosFilesUtils.generateMemberName(file);
const uploadingDsn = `${toPds}(${memName})`;
try {
const uploadStream = IO.createReadStream(file);
await Upload.streamToDataSet(session, uploadStream, uploadingDsn);
}
catch(error) {
Logger.getAppLogger().error(error);
throw error;

Check warning on line 240 in packages/zosfiles/src/methods/copy/Copy.ts

View check run for this annotation

Codecov / codecov/patch

packages/zosfiles/src/methods/copy/Copy.ts#L239-L240

Added lines #L239 - L240 were not covered by tests
}
}
fs.rmSync(downloadDir, {recursive: true});
return {
Expand Down

0 comments on commit bc51780

Please sign in to comment.