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

Fix bug with replacing db with backups #3229

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HenrikJannsen
Copy link
Contributor

Fixes #3225

@@ -80,9 +80,11 @@ public BackupService(Path dataDir, Path storeFilePath, MaxBackupSize maxBackupSi
this.maxBackupSize = maxBackupSize;

fileName = storeFilePath.getFileName().toString();
Path backupDir = Paths.get(storeFilePath.toString()
String relativeStoreFilePath = storeFilePath.toString().replaceFirst(dataDir.toString(), "");
Copy link
Contributor

Choose a reason for hiding this comment

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

PatternSyntaxException is thrown when executing this line: "Illegal/unsupported escape sequence".

I think this should work for any OS: String relativeStoreFilePath = dataDir.relativize(storeFilePath).toString();

Copy link
Contributor

@axpoems axpoems left a comment

Choose a reason for hiding this comment

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

This doesn't work on my OS. See comment for a suggestion (which I've tested and works for me).

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.

Bisq2 will not start for user with "db" embedded in username
2 participants