修复文件重命名后分享码依旧存在的bug
This commit is contained in:
parent
a3927f4d71
commit
46c26c94e0
@ -812,9 +812,12 @@ public class CommunicateToMainService {
|
||||
return response.failure("文件不存在");
|
||||
|
||||
File newFile = new File(file.getParentFile().getAbsolutePath(), fileOperateMessage.getName());
|
||||
if(file.renameTo(newFile))
|
||||
if(file.renameTo(newFile)) {
|
||||
String shareCode = shareFileMapper.selectShareCodeByFilePath(file.getAbsolutePath());
|
||||
shareFileMapper.deleteShareFile(shareCode);
|
||||
shareFileMapper.deleteShareFileRecord(shareCode);
|
||||
return response.success("重命名成功");
|
||||
else
|
||||
} else
|
||||
return response.failure("重命名失败");
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user