diff --git a/.github/workflows/build-citydb-tool.yml b/.github/workflows/build-citydb-tool.yml new file mode 100644 index 00000000..2b69d121 --- /dev/null +++ b/.github/workflows/build-citydb-tool.yml @@ -0,0 +1,28 @@ +name: Build citydb-tool + +on: [push, pull_request] + +jobs: + build: + runs-on: ${{matrix.os}}-latest + strategy: + matrix: + os: ['ubuntu', 'windows'] + java: [ '11' ] + distribution: [ 'temurin' ] + fail-fast: false + + steps: + - name: "Checkout" + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: "Set up Java" + uses: actions/setup-java@v3 + with: + distribution: ${{ matrix.distribution }} + java-version: ${{ matrix.java }} + - name: "Grant execute permission for gradlew" + run: chmod +x ./gradlew + - name: "Build with Gradle" + run: ./gradlew build diff --git a/README.md b/README.md index 4884cbef..d54f368c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![Gradle build](https://img.shields.io/github/actions/workflow/status/3dcitydb/citydb-tool/build-citydb-tool.yml?logo=Gradle&logoColor=white&style=flat-square) + # citydb-tool 3D City Database 5.0 CLI to import/export city model data and to run database operations diff --git a/citydb-core/src/main/java/org/citydb/core/file/input/ZipInputFile.java b/citydb-core/src/main/java/org/citydb/core/file/input/ZipInputFile.java index 09f25bd7..422acc9f 100644 --- a/citydb-core/src/main/java/org/citydb/core/file/input/ZipInputFile.java +++ b/citydb-core/src/main/java/org/citydb/core/file/input/ZipInputFile.java @@ -76,6 +76,14 @@ public URI getFileURI() { } private FileSystem getFileSystem() { + if (fileSystem == null) { + try { + fileSystem = FileSystems.getFileSystem(fileURI); + } catch (Throwable e) { + // + } + } + if (fileSystem == null) { try { fileSystem = FileSystems.newFileSystem(fileURI, Collections.emptyMap());