Skip to content

Commit

Permalink
upgrade version to 0.4.0 and fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
li-guohao committed Jul 5, 2023
1 parent 6d615c2 commit 4e66fca
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
compileOnly "io.projectreactor:reactor-core:3.5.1"
compileOnly "org.springframework:spring-webflux:6.0.3"
compileOnly "org.springdoc:springdoc-openapi-starter-webflux-api:2.0.2"
compileOnly files('lib/api-0.3.1.jar')
compileOnly files('lib/api-0.4.0.jar')

// lombok
compileOnly "org.projectlombok:lombok:$lombok"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group=run.ikaros.plugin.file
description=A local files import plugin for ikaros.
version=0.2.1
version=0.4.0
Binary file not shown.
Binary file renamed lib/api-0.3.1.jar → lib/api-0.4.0.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,15 @@ private run.ikaros.api.core.file.File handleSingle(File file, Long parentId)
run.ikaros.api.core.file.File fileDto = new run.ikaros.api.core.file.File();
fileDto.setFolderId(parentId);
fileDto.setName(name);
fileDto.setOriginalName(name);
fileDto.setType(FileUtils.parseTypeByPostfix(filePostfix));
fileDto.setUrl(
uploadFilePath.replace(ikarosProperties.getWorkDir().toFile().getAbsolutePath(), "")
.replace("\\", "/"));
fileDto.setCanRead(true);
fileDto.setType(FileUtils.parseTypeByPostfix(filePostfix));
fileDto.setOriginalPath(file.getAbsolutePath());
fileDto.setFsPath(uploadFile.getAbsolutePath());
fileDto.setSize(file.length());
fileDto.setCreateTime(LocalDateTime.now());
fileDto.setUpdateTime(LocalDateTime.now());
return fileDto;
}

Expand All @@ -140,7 +139,7 @@ private Mono<Void> handleImportDirFile(File file, Long parentId) {
return Mono.empty();
}

return fileOperate.existsByOriginalPath(file.getAbsolutePath())
return fileOperate.existsByFsPath(file.getAbsolutePath())
.filter(exist -> !exist)
.mapNotNull(exists -> {
try {
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: PluginLocalFilesImport
# plugin entry class that extends BasePlugin
clazz: run.ikaros.plugin.file.LocalFilesImportPlugin
# plugin 'version' is a valid semantic version string (see semver.org).
version: 0.2.1
requires: ">=0.3.1"
version: 0.4.0
requires: ">=0.4.0"
author:
name: Ikaros OSS Team
website: https://github.com/ikaros-dev
Expand Down

0 comments on commit 4e66fca

Please sign in to comment.