修复反代前缀不能正常使用的bug;修复文件重命名之后分享码依旧存在的bug
This commit is contained in:
parent
246b1a2c26
commit
170841e458
@ -29,7 +29,7 @@ public class Site {
|
||||
@JsonProperty("host")
|
||||
public String getHost(){
|
||||
if(reverseProxyPrefix != null)
|
||||
return reverseProxyPrefix;
|
||||
return "https://" + reverseProxyPrefix + "/";
|
||||
else if(domain != null)
|
||||
return "https://" + domain + "/";
|
||||
else
|
||||
|
||||
@ -628,11 +628,14 @@ public class FileService {
|
||||
return response.failure("文件不存在").toJSONString();
|
||||
|
||||
File newFile = new File(file.getParentFile().getPath(), name);
|
||||
if (file.renameTo(newFile))
|
||||
if (file.renameTo(newFile)) {
|
||||
response.success("重命名成功");
|
||||
else
|
||||
String shareCode = shareFileMapper.selectShareCodeByFilePath(file.getAbsolutePath());
|
||||
shareFileMapper.deleteShareFile(shareCode);
|
||||
shareFileMapper.deleteShareFileRecord(shareCode);
|
||||
} else
|
||||
response.failure("重命名失败");
|
||||
}else {
|
||||
} else {
|
||||
FileOperateMessage rename = new FileOperateMessage();
|
||||
rename.setPath(path);
|
||||
rename.setName(name);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user