Skip to content

Commit

Permalink
fix: fetch work dir backup api. (#1282)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby authored Feb 22, 2021
1 parent b412d5d commit a848b73
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public BackupController(BackupService backupService, HaloProperties haloProperti

@GetMapping("work-dir/fetch")
public BackupDTO getWorkDirBackup(@RequestParam("filename") String filename) {
return backupService.getBackup(Paths.get(haloProperties.getWorkDir(), filename), WHOLE_SITE)
return backupService
.getBackup(Paths.get(haloProperties.getBackupDir(), filename), WHOLE_SITE)
.orElseThrow(() ->
new NotFoundException("备份文件 " + filename + " 不存在或已删除!").setErrorData(filename));
}
Expand Down

0 comments on commit a848b73

Please sign in to comment.