mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-23 12:27:48 +00:00
fix bug - open parent folder url error (#6703)
This commit is contained in:
@@ -130,7 +130,12 @@ const ContextMenu = ({
|
||||
const { groupRecordIndex, rowIdx } = selectedPosition;
|
||||
const record = recordGetterByIndex({ isGroupView, groupRecordIndex, recordIndex: rowIdx });
|
||||
if (!record) return;
|
||||
const parentDir = record[PRIVATE_COLUMN_KEY.PARENT_DIR];
|
||||
let parentDir = record[PRIVATE_COLUMN_KEY.PARENT_DIR];
|
||||
|
||||
if (window.location.pathname.endsWith('/')) {
|
||||
parentDir = parentDir.slice(1);
|
||||
}
|
||||
|
||||
const url = window.location.origin + window.location.pathname + Utils.encodePath(parentDir);
|
||||
window.open(url, '_blank');
|
||||
}, [isGroupView, recordGetterByIndex, selectedPosition]);
|
||||
|
Reference in New Issue
Block a user