Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PBM-1058: fix phys backups on datadirs with tailing / (#802)
Phys backup while trimming datadir from the file path always added a slash to the trim prefix. In case datadir was set with a tailing slash it led to a double slash and datadir wasn't trimmed at all (`Trimprefix("/data/db/file1", "/data/db//")`). Therefore in the backup's meta such files contain datadir and the restore would put them in a subdirectory inside datadir, "/data/db/data/db/file1" instead of "/data/db/file1". This change fixes it.
- Loading branch information
Showing
1 changed file
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters