You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2023/06/13 02:37:21 UTC

[iotdb] branch xingtanzjr/fix_coding_pattern created (now 93f0d7bc150)

This is an automated email from the ASF dual-hosted git repository.

xingtanzjr pushed a change to branch xingtanzjr/fix_coding_pattern
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 93f0d7bc150 fix a  a coding pattern that could possibly have security impact

This branch includes the following new commits:

     new 93f0d7bc150 fix a  a coding pattern that could possibly have security impact

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: fix a a coding pattern that could possibly have security impact

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xingtanzjr pushed a commit to branch xingtanzjr/fix_coding_pattern
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 93f0d7bc1504cc61264b73273c396dd1aad1964b
Author: Jinrui.Zhang <xi...@gmail.com>
AuthorDate: Tue Jun 13 10:36:54 2023 +0800

    fix a  a coding pattern that could possibly have security impact
---
 .../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()) {