public static String addDataHomeDir(final String dir) {
    String dataHomeDir = System.getProperty(IoTDBConstant.IOTDB_DATA_HOME, null);
    if (dataHomeDir == null) {
      dataHomeDir = System.getProperty(IoTDBConstant.IOTDB_HOME, null);
    }
    if (dataHomeDir == null) {
      return dir;
    }

    File dataHomeFile = new File(dataHomeDir);
    try {
      dataHomeDir = dataHomeFile.getCanonicalPath();
    } catch (IOException e) {
      logger.error("Fail to get canonical path of {}", dataHomeFile, e);
    }
    return FileUtils.addPrefix2FilePath(dataHomeDir, dir);
  }
if the folders are relative paths, add IOTDB_DATA_HOME as the path prefix
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java