Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont log error if BSQ blocks directory does not exist in resources #5909

Conversation

chimp1984
Copy link
Contributor

In case the BSQ blocks directory does not exist in resources (as in case of REG_TEST)

we do not want to log an error stacktrace but just an info message.

Use File.separator instead of "/"

Fixes #replaceWithIssueNr, fixes #replaceWithIssueNr

Your PR description here.

…ase of REG_TEST)

we do not want to log an error stacktrace but just an info message.

Use `File.separator` instead of "/"
@@ -123,9 +123,11 @@ void copyFromResources(String postFix) {
}
for (String fileName : fileNames) {
File destinationFile = new File(storageDir, fileName);
FileUtil.resourceToFile(resourceDir + "/" + fileName, destinationFile);
FileUtil.resourceToFile(resourceDir + File.separator + fileName, destinationFile);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't appear to work on Windows. It has to be "/", not "\".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah really? Weird... Will revert that. Javas resource handling is really a pain.

File.separator doesn't appear to work on Windows. It has to be "/", not "\".
See: bisq-network#5909 (review)
Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@ripcurlx ripcurlx merged commit 7a6ae2b into bisq-network:master Dec 9, 2021
ripcurlx pushed a commit that referenced this pull request Dec 9, 2021
File.separator doesn't appear to work on Windows. It has to be "/", not "\".
See: #5909 (review)
@chimp1984 chimp1984 deleted the avoid-logging-error-for-non-existing-resource-files branch December 9, 2021 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants