diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-07-19 19:31:43 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-08-02 15:31:32 +0200 |
commit | d190d4f328a4bf4f9ad235f8901a5971d8d7bf84 (patch) | |
tree | 2164f7954bb594ebd856d64ef29d62c55b4a47a9 /apps | |
parent | 6ec72ce81d793fe473b117f5e6c0658cbbf0f1ab (diff) | |
download | nextcloud-server-d190d4f328a4bf4f9ad235f8901a5971d8d7bf84.tar.gz nextcloud-server-d190d4f328a4bf4f9ad235f8901a5971d8d7bf84.zip |
fix(files_sharing): `open-in-files` should open a folder and not the parent
For files this behavior is fine, but for folders the folder itself should be opened.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/src/actions/openInFilesAction.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_sharing/src/actions/openInFilesAction.ts b/apps/files_sharing/src/actions/openInFilesAction.ts index 6909ee143c0..863b24681ce 100644 --- a/apps/files_sharing/src/actions/openInFilesAction.ts +++ b/apps/files_sharing/src/actions/openInFilesAction.ts @@ -21,7 +21,7 @@ */ import type { Node } from '@nextcloud/files' -import { registerFileAction, FileAction, DefaultType } from '@nextcloud/files' +import { registerFileAction, FileAction, DefaultType, FileType } from '@nextcloud/files' import { translate as t } from '@nextcloud/l10n' import { sharesViewId, sharedWithYouViewId, sharedWithOthersViewId, sharingByLinksViewId } from '../views/shares' @@ -41,6 +41,8 @@ export const action = new FileAction({ ].includes(view.id), async exec(node: Node) { + const isFolder = node.type === FileType.Folder + window.OCP.Files.Router.goToRoute( null, // use default route { view: 'files', fileid: node.fileid }, |