This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch rel/1.2
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.2 by this push:
new f77272a6af1 fix a a coding pattern that could possibly have security
impact (#10136) (#10138)
f77272a6af1 is described below
commit f77272a6af1cfca4f8c976510f2ea23ff11bdb3d
Author: Zhang.Jinrui <[email protected]>
AuthorDate: Tue Jun 13 20:08:58 2023 +0800
fix a a coding pattern that could possibly have security impact (#10136)
(#10138)
---
.../java/org/apache/iotdb/db/conf/directories/TierManager.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git
a/server/src/main/java/org/apache/iotdb/db/conf/directories/TierManager.java
b/server/src/main/java/org/apache/iotdb/db/conf/directories/TierManager.java
index e4dafa2df77..c513d059241 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/directories/TierManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/directories/TierManager.java
@@ -220,13 +220,12 @@ public class TierManager {
if (!file.exists()) {
return getTiersNum() - 1;
}
-
- String filePath;
+ Path filePath;
try {
- filePath = file.getCanonicalPath();
+ filePath = file.getCanonicalFile().toPath();
} catch (IOException e) {
logger.error("Fail to get canonical path of data dir {}", file, e);
- filePath = file.getPath();
+ filePath = file.toPath();
}
for (Map.Entry<String, Integer> entry : seqDir2TierLevel.entrySet()) {