From 3f8834ac0ea31aa480bcef9ad6589ecb66515397 Mon Sep 17 00:00:00 2001 From: Zhengguo Yang Date: Fri, 30 Apr 2021 09:55:52 +0800 Subject: [PATCH] fix double slashes when join paths (#5734) --- .../src/main/java/org/apache/doris/backup/Repository.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java b/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java index ae8ce5c6d7..9d1ffcdc54 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java +++ b/fe/fe-core/src/main/java/org/apache/doris/backup/Repository.java @@ -298,8 +298,7 @@ public class Repository implements Writable { // Check if this repo is available. // If failed to connect this repo, set errMsg and return false. public boolean ping() { - String checkPath = Joiner.on(PATH_DELIMITER).join(location, - joinPrefix(PREFIX_REPO, name)); + String checkPath = Paths.get(location, joinPrefix(PREFIX_REPO, name)).toString(); Status st = storage.checkPathExist(checkPath); if (!st.ok()) { errMsg = TimeUtils.longToTimeString(System.currentTimeMillis()) + ": " + st.getErrMsg();