Skip to content

Commit

Permalink
Fix the problem of not being able to upload if folder doesn't exist
Browse files Browse the repository at this point in the history
Signed-off-by: JohnNiang <[email protected]>
  • Loading branch information
JohnNiang committed Oct 28, 2024
1 parent 3d787dc commit aa315e9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ private Mono<AListGetFileInfoRes> getFile(String token,
if (!Objects.equals(OK.value(), result.getCode())) {
if (ignoreNotFound
&& Objects.equals(INTERNAL_SERVER_ERROR.value(), result.getCode())
&& "object not found".equals(result.getMessage())) {
// According to https://alist.nn.ci/guide/api/fs.html, we have no better
// way to determine whether the file exists
&& StringUtils.endsWith(result.getMessage(), "object not found")) {
return Mono.empty();
}
return Mono.error(new ServerWebInputException(
Expand Down

0 comments on commit aa315e9

Please sign in to comment.