Skip to content
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
fix(files): pass Node to FileInfo object
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux authored and nextcloud-command committed Sep 20, 2025
commit cbb3cab9196e477479a5eb82b7564c6e39b3fbd2
1 change: 1 addition & 0 deletions apps/files/src/services/FileInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default function(node: Node) {
fileInfo.get = (key) => fileInfo[key]
fileInfo.isDirectory = () => fileInfo.mimetype === 'httpd/unix-directory'
fileInfo.canEdit = () => Boolean(fileInfo.permissions & OC.PERMISSION_UPDATE)
fileInfo.node = node

return fileInfo
}
4 changes: 3 additions & 1 deletion apps/files/src/views/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
</NcAppSidebar>
</template>
<script lang="ts">
import type { INode } from '@nextcloud/files'

import { davRemoteURL, davRootPath, File, Folder, formatFileSize } from '@nextcloud/files'
import { defineComponent } from 'vue'
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
Expand Down Expand Up @@ -156,7 +158,7 @@ export default defineComponent({
error: null,
loading: true,
fileInfo: null,
node: null,
node: null as INode | null,
isFullScreen: false,
hasLowHeight: false,
}
Expand Down