]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files): Ensure the correct `dir` query is set on folder action
authorFerdinand Thiessen <opensource@fthiessen.de>
Thu, 25 Jan 2024 14:06:32 +0000 (15:06 +0100)
committerFerdinand Thiessen <opensource@fthiessen.de>
Thu, 25 Jan 2024 14:07:52 +0000 (15:07 +0100)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
apps/files/src/actions/openFolderAction.ts

index e6d8c7f7edf0c9a9b6482a140b61f8c8af9604b8..791b328b3ed378b6f2796c23eb27e1f4780fbf44 100644 (file)
@@ -19,7 +19,6 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  */
-import { join } from 'path'
 import { Permission, Node, FileType, View, FileAction, DefaultType } from '@nextcloud/files'
 import { translate as t } from '@nextcloud/l10n'
 import FolderSvg from '@mdi/svg/svg/folder.svg?raw'
@@ -49,7 +48,7 @@ export const action = new FileAction({
                        && (node.permissions & Permission.READ) !== 0
        },
 
-       async exec(node: Node, view: View, dir: string) {
+       async exec(node: Node, view: View) {
                if (!node || node.type !== FileType.Folder) {
                        return false
                }
@@ -57,7 +56,7 @@ export const action = new FileAction({
                window.OCP.Files.Router.goToRoute(
                        null,
                        { view: view.id, fileid: node.fileid },
-                       { dir: join(dir, node.basename) },
+                       { dir: node.path },
                )
                return null
        },