Skip to content

Commit

Permalink
Hotfix - suffix not working (#71)
Browse files Browse the repository at this point in the history
* This PR introduces a hotfix for the --suffix filtering not working.
  • Loading branch information
sven1103 authored Sep 17, 2020
1 parent d2fbdbb commit 87bd3e1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Hotfix 0.4.1

* Fix the issue of not finding datasets when filtering by suffix

## Release 0.4.0

* Calculate CRC32 checksums for every downloaded file and compares it against the sum stored in openBIS
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<version>2.2.0</version>
</parent>
<artifactId>postman-cli</artifactId>
<version>0.4.0</version>
<version>0.4.1</version>
<name>Postman cli</name>
<url>http://github.com/qbicsoftware/postman-cli</url>
<description>A client software written in Java for dataset downloads from QBiC's data management system openBIS </description>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/life/qbic/model/download/QbicDataFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public List<DataSetFile> findAllRegexFilteredIDs(String ident, List<String> rege
*/
public List<DataSetFile> findAllSuffixFilteredIDs(String ident, List<String> suffixes) {
List<DataSet> allDatasets = findAllDatasetsRecursive(ident);

List<DataSetFile> allFileIDs = new ArrayList<>();

for (DataSet ds : allDatasets) {
Expand All @@ -141,7 +142,7 @@ public List<DataSetFile> findAllSuffixFilteredIDs(String ident, List<String> suf
// remove everything that doesn't match the suffix -> only add if suffix matches
for (DataSetFile file : files) {
for (String suffix : suffixes) {
if (StringUtil.endsWithIgnoreCase(file.getPermId().toString(), suffix)) {
if (StringUtil.endsWithIgnoreCase(file.getPath(), suffix)) {
filesFiltered.add(file);
}
}
Expand Down

0 comments on commit 87bd3e1

Please sign in to comment.