Skip to content

Commit 7f67df8

Browse files
committed
Use original structured name if no identifier (file name is the same as distribution name)
1 parent 97748ce commit 7f67df8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • src/main/java/io/github/jpmorganchase/fusion

src/main/java/io/github/jpmorganchase/fusion/Fusion.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,11 @@ public void download(
630630
extension = "." + extension;
631631
}
632632

633-
String safeFileName = identifier.replaceAll("[^a-zA-Z0-9_.\\-]", "_");
633+
String safeFileName = (identifier.equals(distribution)
634+
? String.format("%s_%s_%s", catalogName, dataset, seriesMember)
635+
: identifier)
636+
.replaceAll("[^a-zA-Z0-9_.\\-]", "_");
637+
634638
String fullPath = path + "/" + safeFileName + extension;
635639

636640
String url = String.format(

0 commit comments

Comments
 (0)