Skip to content

Commit

Permalink
quick fix
Browse files Browse the repository at this point in the history
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
  • Loading branch information
pujal0909 committed Feb 26, 2025
1 parent 66af114 commit 611f229
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/zosfiles/src/methods/download/Download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ export class Download {
}

if (options.directory == null) {
if (dataSetObj.dsorg && dataSetObj.dsorg.startsWith("PO")) {
if (dataSetObj.dsorg?.startsWith("PO")) {
mutableOptions.directory = ZosFilesUtils.getDirsFromDataSet(dataSetObj.dsname);
} else {
mutableOptions.file = `${dataSetObj.dsname}.` +
Expand All @@ -371,7 +371,7 @@ export class Download {
mutableOptions.directory = undefined;
mutableOptions.extension = undefined;
}
} else if (dataSetObj.dsorg && dataSetObj.dsorg.startsWith("PO")) {
} else if (dataSetObj.dsorg?.startsWith("PO")) {
mutableOptions.directory = `${mutableOptions.directory}/${ZosFilesUtils.getDirsFromDataSet(dataSetObj.dsname)}`;
} else {
mutableOptions.file = `${dataSetObj.dsname}.${mutableOptions.extension ?? ZosFilesUtils.DEFAULT_FILE_EXTENSION}`;
Expand Down

0 comments on commit 611f229

Please sign in to comment.