Skip to content

Commit

Permalink
fixup! feat: download wfs files to tmp folder for bucket service
Browse files Browse the repository at this point in the history
Refactor to rename downloaded file to not start with a ".".
Example name: <urlPath>_<numberOfTotalFeatureProcessed>

ING-3609
  • Loading branch information
kapil-agnihotri committed Aug 21, 2023
1 parent c80755c commit c7dfff6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,11 @@ private void createNextIterator() {
try {
URL url = nextUri.toURL();
StringBuilder fileName = new StringBuilder(tmpdir);
fileName.append("/").append(url.getPath().replaceAll("/", "."))
String urlPath = url.getPath();
if (urlPath.startsWith("/")) {
urlPath = urlPath.replaceFirst("/", "");
}
fileName.append("/").append(urlPath.replaceAll("/", "_")).append("_")
.append(totalFeaturesProcessed).append(".gml");

// TODO: may be download files in a thread
Expand Down

0 comments on commit c7dfff6

Please sign in to comment.