Skip to content

Commit

Permalink
fix(files_sharing): open-in-files should open a folder and not the …
Browse files Browse the repository at this point in the history
…parent

For files this behavior is fine, but for folders the folder itself should be opened.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux authored and skjnldsv committed Aug 2, 2024
1 parent 6ec72ce commit d190d4f
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit d190d4f

Please sign in to comment.