Skip to content

Commit d60179d

Browse files
susnuxbackportbot[bot]
authored andcommitted
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>
1 parent 68c7d9e commit d60179d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/files_sharing/src/actions/openInFilesAction.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
import type { Node } from '@nextcloud/files'
2323

24-
import { registerFileAction, FileAction, DefaultType } from '@nextcloud/files'
24+
import { registerFileAction, FileAction, DefaultType, FileType } from '@nextcloud/files'
2525
import { translate as t } from '@nextcloud/l10n'
2626

2727
import { sharesViewId, sharedWithYouViewId, sharedWithOthersViewId, sharingByLinksViewId } from '../views/shares'
@@ -41,6 +41,8 @@ export const action = new FileAction({
4141
].includes(view.id),
4242

4343
async exec(node: Node) {
44+
const isFolder = node.type === FileType.Folder
45+
4446
window.OCP.Files.Router.goToRoute(
4547
null, // use default route
4648
{ view: 'files', fileid: node.fileid },

0 commit comments

Comments
 (0)