Commit cff943f6 authored by yihua.huang's avatar yihua.huang

fix path format error

parent 36384246
...@@ -37,6 +37,9 @@ public class FilePipeline implements Pipeline { ...@@ -37,6 +37,9 @@ public class FilePipeline implements Pipeline {
* @param path 文件保存路径 * @param path 文件保存路径
*/ */
public FilePipeline(String path) { public FilePipeline(String path) {
if (!path.endsWith("/")&&!path.endsWith("\\")){
path+="/";
}
this.path = path; this.path = path;
} }
......
...@@ -34,6 +34,9 @@ public class FileDownloader implements Downloader { ...@@ -34,6 +34,9 @@ public class FileDownloader implements Downloader {
} }
public FileDownloader(String path, Downloader downloaderWhenFileMiss) { public FileDownloader(String path, Downloader downloaderWhenFileMiss) {
if (!path.endsWith("/")&&!path.endsWith("\\")){
path+="/";
}
this.path = path; this.path = path;
this.downloaderWhenFileMiss = downloaderWhenFileMiss; this.downloaderWhenFileMiss = downloaderWhenFileMiss;
} }
......
...@@ -37,6 +37,9 @@ public class JsonFilePipeline implements Pipeline { ...@@ -37,6 +37,9 @@ public class JsonFilePipeline implements Pipeline {
* @param path 文件保存路径 * @param path 文件保存路径
*/ */
public JsonFilePipeline(String path) { public JsonFilePipeline(String path) {
if (!path.endsWith("/")&&!path.endsWith("\\")){
path+="/";
}
this.path = path; this.path = path;
} }
......
...@@ -47,6 +47,9 @@ public class FileCacheQueueScheduler implements Scheduler { ...@@ -47,6 +47,9 @@ public class FileCacheQueueScheduler implements Scheduler {
private Set<String> urls; private Set<String> urls;
public FileCacheQueueScheduler(String filePath) { public FileCacheQueueScheduler(String filePath) {
if (!filePath.endsWith("/")&&!filePath.endsWith("\\")){
filePath+="/";
}
this.filePath = filePath; this.filePath = filePath;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment