1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 02:42:47 +00:00

fix record not found in image dialog (#7609)

Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
Aries
2025-03-14 16:09:14 +08:00
committed by GitHub
parent 0c29734c5f
commit de2032e59c
3 changed files with 5 additions and 4 deletions

View File

@@ -27,13 +27,14 @@ const EmbeddedFileDetails = ({ repoID, repoInfo, dirent, path, onClose, width =
}, []);
useEffect(() => {
seafileAPI.getFileInfo(repoID, path).then(res => {
const fullPath = path.split('/').pop() === dirent?.name ? path : Utils.joinPath(path, dirent?.name || '');
seafileAPI.getFileInfo(repoID, fullPath).then(res => {
setDirentDetail(res.data);
}).catch(error => {
const errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);
});
}, [repoID, path]);
}, [repoID, path, dirent]);
useEffect(() => {
if (isView || isTag) return;