You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/07/02 12:55:35 UTC

[shardingsphere-elasticjob-lite] branch master updated: The data source cannot be created due to a file path problem (#903)

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

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob-lite.git


The following commit(s) were added to refs/heads/master by this push:
     new d8c8eb3  The data source cannot be created due to a file path problem (#903)
d8c8eb3 is described below

commit d8c8eb3be74d1941d25362beb6af61cd716e7108
Author: viviel <37...@users.noreply.github.com>
AuthorDate: Thu Jul 2 20:55:30 2020 +0800

    The data source cannot be created due to a file path problem (#903)
---
 .../shardingsphere/elasticjob/lite/console/util/HomeFolderUtils.java  | 2 +-
 .../elasticjob/lite/console/util/HomeFolderUtilsTest.java             | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtils.java b/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtils.java
index 5887955..0583b01 100644
--- a/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtils.java
+++ b/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtils.java
@@ -53,6 +53,6 @@ public final class HomeFolderUtils {
     }
     
     private static String getHomeFolder() {
-        return String.format("%s%s%s%s", USER_HOME, System.lineSeparator(), CONSOLE_ROOT_FOLDER, System.lineSeparator());
+        return String.format("%s%s%s%s", USER_HOME, File.separator, CONSOLE_ROOT_FOLDER, File.separator);
     }
 }
diff --git a/elastic-job-lite-console/src/test/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtilsTest.java b/elastic-job-lite-console/src/test/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtilsTest.java
index afd9a71..9754588 100644
--- a/elastic-job-lite-console/src/test/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtilsTest.java
+++ b/elastic-job-lite-console/src/test/java/org/apache/shardingsphere/elasticjob/lite/console/util/HomeFolderUtilsTest.java
@@ -19,12 +19,14 @@ package org.apache.shardingsphere.elasticjob.lite.console.util;
 
 import org.junit.Test;
 
+import java.io.File;
+
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
 
 public final class HomeFolderUtilsTest {
     
-    private static final String HOME_FOLDER = System.getProperty("user.home") + System.lineSeparator() + ".elastic-job-console" + System.lineSeparator();
+    private static final String HOME_FOLDER = System.getProperty("user.home") + File.separator + ".elastic-job-console" + File.separator;
     
     @Test
     public void assertGetFilePathInHomeFolder() {