Fix share option should not be enabled for a prefix (#3135)
This commit is contained in:
committed by
GitHub
parent
924c38faa6
commit
7b43779fb0
@@ -359,6 +359,8 @@ const ListObjects = () => {
|
||||
useEffect(() => {
|
||||
if (selectedObjects.length === 1) {
|
||||
const objectName = selectedObjects[0];
|
||||
const isPrefix = objectName.endsWith("/");
|
||||
|
||||
let objectType: AllowedPreviews = previewObjectType(metaData, objectName);
|
||||
|
||||
if (objectType !== "none" && canDownload) {
|
||||
@@ -367,7 +369,7 @@ const ListObjects = () => {
|
||||
setCanPreviewFile(false);
|
||||
}
|
||||
|
||||
if (objectName.endsWith("/") || canDownload) {
|
||||
if (canDownload && !isPrefix) {
|
||||
setCanShareFile(true);
|
||||
} else {
|
||||
setCanShareFile(false);
|
||||
|
||||
Reference in New Issue
Block a user