Skip to content

Commit

Permalink
Fix share option should not be enabled for a prefix (minio#3135)
Browse files Browse the repository at this point in the history
  • Loading branch information
prakashsvmx authored and cesnietor committed Jan 12, 2024
1 parent 06072a8 commit 9961323
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -367,7 +369,7 @@ const ListObjects = () => {
setCanPreviewFile(false);
}

if (objectName.endsWith("/") || canDownload) {
if (canDownload && !isPrefix) {
setCanShareFile(true);
} else {
setCanShareFile(false);
Expand Down

0 comments on commit 9961323

Please sign in to comment.