aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-07-19 19:31:43 +0200
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-08-02 15:44:29 +0200
commit5d2d98fefec18fd26f2ab2c3af2c099a805089ae (patch)
tree17e68473490e3da9ebc4ff3815e8553a7325f066 /apps
parentfd14d66373c5ffc5df61997d29b433289aa3cc44 (diff)
downloadnextcloud-server-5d2d98fefec18fd26f2ab2c3af2c099a805089ae.tar.gz
nextcloud-server-5d2d98fefec18fd26f2ab2c3af2c099a805089ae.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.ts4
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 },