fix path format error

master
yihua.huang 2013-08-07 13:05:12 +08:00
parent 36384246b5
commit cff943f698
4 changed files with 12 additions and 0 deletions

View File

@ -37,6 +37,9 @@ public class FilePipeline implements Pipeline {
* @param path
*/
public FilePipeline(String path) {
if (!path.endsWith("/")&&!path.endsWith("\\")){
path+="/";
}
this.path = path;
}

View File

@ -34,6 +34,9 @@ public class FileDownloader implements Downloader {
}
public FileDownloader(String path, Downloader downloaderWhenFileMiss) {
if (!path.endsWith("/")&&!path.endsWith("\\")){
path+="/";
}
this.path = path;
this.downloaderWhenFileMiss = downloaderWhenFileMiss;
}

View File

@ -37,6 +37,9 @@ public class JsonFilePipeline implements Pipeline {
* @param path
*/
public JsonFilePipeline(String path) {
if (!path.endsWith("/")&&!path.endsWith("\\")){
path+="/";
}
this.path = path;
}

View File

@ -47,6 +47,9 @@ public class FileCacheQueueScheduler implements Scheduler {
private Set<String> urls;
public FileCacheQueueScheduler(String filePath) {
if (!filePath.endsWith("/")&&!filePath.endsWith("\\")){
filePath+="/";
}
this.filePath = filePath;
}