[bisq-network/bisq] Fix issue with resource files not loaded on Ubuntu Linux (PR #5898)
Christoph Atteneder
notifications at github.com
Mon Dec 6 11:40:25 CET 2021
@ripcurlx commented on this pull request.
> @@ -121,22 +128,21 @@ void copyFromResources(String postFix) {
log.info("Directory {} in resources does not exist.", resourceDir);
return;
}
- File dir = new File(dirUrl.toURI());
- String[] fileNames = dir.list();
- if (fileNames == null) {
- log.info("No files in directory. {}", dir.getAbsolutePath());
+ FileSystem fileSystem = FileSystems.newFileSystem(dirUrl.toURI(), Collections.emptyMap());
+ List<Path> filePaths = Files.walk(fileSystem.getPath(resourceDir), 1).collect(Collectors.toList());
+ if (filePaths.size() <= 1) {
+ log.info("No files in directory. {}", dirUrl.toString());
toString is not necessary.
```suggestion
log.info("No files in directory. {}", dirUrl);
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5898#pullrequestreview-823790073
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20211206/5cf1f508/attachment-0001.htm>
More information about the bisq-github
mailing list