Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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 <[email protected]>
  • Loading branch information
susnux authored and skjnldsv committed Aug 2, 2024
commit 5d2d98fefec18fd26f2ab2c3af2c099a805089ae
4 changes: 3 additions & 1 deletion apps/files_sharing/src/actions/openInFilesAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 },
Expand Down