Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 3 additions & 4 deletions apps/files/src/services/DropService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import type { RootDirectory } from './DropServiceUtils'

import { Folder, Node, NodeStatus, davRootPath } from '@nextcloud/files'
import { getUploader, hasConflict } from '@nextcloud/upload'
import { join } from 'path'
import { joinPaths } from '@nextcloud/paths'
import { join } from '@nextcloud/paths'
import { showError, showInfo, showSuccess, showWarning } from '@nextcloud/dialogs'
import { translate as t } from '@nextcloud/l10n'
import { t } from '@nextcloud/l10n'
import Vue from 'vue'

import { Directory, traverseTree, resolveConflict, createDirectoryIfNotExists } from './DropServiceUtils'
Expand Down Expand Up @@ -125,7 +124,7 @@ export async function onDropExternalFiles(root: RootDirectory, destination: Fold
// If the file is a directory, we need to create it first
// then browse its tree and upload its contents.
if (file instanceof Directory) {
const absolutePath = joinPaths(davRootPath, destination.path, relativePath)
const absolutePath = join(davRootPath, destination.path, relativePath)
try {
console.debug('Processing directory', { relativePath })
await createDirectoryIfNotExists(absolutePath)
Expand Down
4 changes: 2 additions & 2 deletions apps/files/src/services/FolderTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { davRemoteURL } from '@nextcloud/files'
import axios from '@nextcloud/axios'
import { generateOcsUrl } from '@nextcloud/router'
import { getCurrentUser } from '@nextcloud/auth'
import { dirname, encodePath, joinPaths } from '@nextcloud/paths'
import { dirname, encodePath, join } from '@nextcloud/paths'
import { getCanonicalLocale, getLanguage } from '@nextcloud/l10n'

import { getContents as getFiles } from './Files.ts'
Expand Down Expand Up @@ -51,7 +51,7 @@ const compareNodes = (a: TreeNodeData, b: TreeNodeData) => collator.compare(a.di
const getTreeNodes = (tree: Tree, currentPath: string = '/', nodes: TreeNode[] = []): TreeNode[] => {
const sortedTree = tree.toSorted(compareNodes)
for (const { id, basename, displayName, children } of sortedTree) {
const path = joinPaths(currentPath, basename)
const path = join(currentPath, basename)
const source = `${sourceRoot}${path}`
const node: TreeNode = {
source,
Expand Down
2 changes: 1 addition & 1 deletion apps/files_trashbin/src/files_views/columns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function parseOriginalLocation(node: Node): string {
}

const dir = dirname(path)
if (dir === path) { // Node is in root folder
if (dir === path || dir === '.') { // Node is in root folder
return t('files_trashbin', 'All files')
}

Expand Down
4 changes: 2 additions & 2 deletions apps/files_versions/src/components/Version.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ import { getCurrentUser } from '@nextcloud/auth'
import { Permission, formatFileSize } from '@nextcloud/files'
import { loadState } from '@nextcloud/initial-state'
import { t } from '@nextcloud/l10n'
import { joinPaths } from '@nextcloud/paths'
import { join } from '@nextcloud/paths'
import { getRootUrl } from '@nextcloud/router'
import { defineComponent } from 'vue'

Expand Down Expand Up @@ -249,7 +249,7 @@ export default defineComponent({

downloadURL(): string {
if (this.isCurrent) {
return getRootUrl() + joinPaths('/remote.php/webdav', this.fileInfo.path, this.fileInfo.name)
return getRootUrl() + join('/remote.php/webdav', this.fileInfo.path, this.fileInfo.name)
} else {
return getRootUrl() + this.version.url
}
Expand Down
6 changes: 3 additions & 3 deletions apps/files_versions/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { FileStat, ResponseDataDetailed } from 'webdav'

import { generateRemoteUrl, generateUrl } from '@nextcloud/router'
import { getCurrentUser } from '@nextcloud/auth'
import { joinPaths, encodePath } from '@nextcloud/paths'
import { join, encodePath } from '@nextcloud/paths'
import moment from '@nextcloud/moment'
import axios from '@nextcloud/axios'

Expand Down Expand Up @@ -97,7 +97,7 @@ function formatVersion(version: any, fileInfo: any): Version {
})
} else {
previewUrl = generateUrl('/apps/files_versions/preview?file={file}&version={fileVersion}&mimeFallback=1', {
file: joinPaths(fileInfo.path, fileInfo.name),
file: join(fileInfo.path, fileInfo.name),
fileVersion: version.basename,
})
}
Expand All @@ -117,7 +117,7 @@ function formatVersion(version: any, fileInfo: any): Version {
mtime,
permissions: 'R',
previewUrl,
url: joinPaths('/remote.php/dav', version.filename),
url: join('/remote.php/dav', version.filename),
source: generateRemoteUrl('dav') + encodePath(version.filename),
fileVersion: version.basename,
}
Expand Down
4 changes: 2 additions & 2 deletions core/src/OC/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
dirname,
encodePath,
isSamePath,
joinPaths,
join,
} from '@nextcloud/paths'
import {
build as buildQueryString,
Expand Down Expand Up @@ -187,7 +187,7 @@ export default {
/**
* @deprecated 18.0.0 use https://www.npmjs.com/package/@nextcloud/paths
*/
joinPaths,
joinPaths: join,

/**
* Host (url) helpers
Expand Down
33 changes: 6 additions & 27 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,33 +128,12 @@ export default defineConfig({
specPattern: ['core/**/*.cy.ts', 'apps/**/*.cy.ts'],
devServer: {
framework: 'vue',
bundler: 'webpack',
webpackConfig: async () => {
process.env.npm_package_name = 'NcCypress'
process.env.npm_package_version = '1.0.0'
process.env.NODE_ENV = 'development'

/**
* Needed for cypress stubbing
*
* @see https://github.com/sinonjs/sinon/issues/1121
* @see https://github.com/cypress-io/cypress/issues/18662
*/
const babel = require('./babel.config.js')
babel.plugins.push([
'@babel/plugin-transform-modules-commonjs',
{
loose: true,
},
])

const config = webpackConfig
config.module.rules.push({
test: /\.svg$/,
type: 'asset/source',
})

return config
bundler: 'vite',
async viteConfig() {
const { default: vue } = await import('@vitejs/plugin-vue2')
return {
plugins: [vue()],
}
},
},
},
Expand Down
9 changes: 6 additions & 3 deletions dist/1252-1252.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.3.3
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.0
- version: 3.12.2
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 2.2.0
Expand All @@ -70,14 +70,17 @@ This file is generated from multiple sources. Included packages:
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.2
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/paths
- version: 2.4.0
- version: 3.0.0
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.3.0
- license: GPL-3.0-or-later
Expand Down
2 changes: 1 addition & 1 deletion dist/1642-1642.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.2
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.1.0
Expand Down
2 changes: 1 addition & 1 deletion dist/2452-2452.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.2
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.1.0
Expand Down
2 changes: 1 addition & 1 deletion dist/3179-3179.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.2
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.1.0
Expand Down
15 changes: 9 additions & 6 deletions dist/3564-3564.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,26 @@ This file is generated from multiple sources. Included packages:
- version: 3.3.3
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.0
- version: 3.12.2
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 2.2.0
- license: GPL-3.0-or-later
- @nextcloud/l10n
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.2
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/paths
- version: 2.4.0
- version: 3.0.0
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.3.0
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 8.34.0
- license: AGPL-3.0-or-later
Expand Down
6 changes: 3 additions & 3 deletions dist/3902-3902.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.3.3
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.0
- version: 3.12.2
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 2.2.0
Expand All @@ -115,10 +115,10 @@ This file is generated from multiple sources. Included packages:
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.2
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/paths
- version: 2.4.0
- version: 3.0.0
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.1.0
Expand Down
2 changes: 1 addition & 1 deletion dist/3920-3920.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.2
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.1.0
Expand Down
4 changes: 2 additions & 2 deletions dist/4107-4107.js

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions dist/4107-4107.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.3.3
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.0
- version: 3.12.2
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 2.2.0
Expand All @@ -71,14 +71,23 @@ This file is generated from multiple sources. Included packages:
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.2
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/paths
- version: 2.4.0
- version: 3.0.0
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.3.0
- license: GPL-3.0-or-later
- @nextcloud/paths
- version: 2.4.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.2.5
- license: GPL-3.0-or-later
Expand Down
2 changes: 1 addition & 1 deletion dist/4107-4107.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/4505-4505.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.2
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/password-confirmation
- version: 5.3.2
Expand Down
2 changes: 1 addition & 1 deletion dist/4508-4508.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.2
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.1.0
Expand Down
2 changes: 1 addition & 1 deletion dist/5528-5528.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.2
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.1.0
Expand Down
6 changes: 3 additions & 3 deletions dist/5664-5664.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.3.3
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.0
- version: 3.12.2
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 2.2.0
Expand All @@ -87,10 +87,10 @@ This file is generated from multiple sources. Included packages:
- version: 3.4.1
- license: GPL-3.0-or-later
- @nextcloud/logger
- version: 3.0.2
- version: 3.0.3
- license: GPL-3.0-or-later
- @nextcloud/paths
- version: 2.4.0
- version: 3.0.0
- license: GPL-3.0-or-later
- @nextcloud/router
- version: 3.1.0
Expand Down
Loading
Loading