We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nextcloud-files/lib/files/nodeData.ts
Lines 68 to 73 in d3ae6ca
Example URI: https://domain.com/remote.php/dav/files/emma/test/picture.jpeg
https://domain.com/remote.php/dav/files/emma/test/picture.jpeg
https://domain.com
/remote.php/dav
/files/emma
/test
picture.jpeg
This would be the expected result, according to what I know.
The current implementation uses dirname + split on the dav service to set the root.
For the example URI
'https://domain.com/remote.php/dav/files/emma/test'.split(/(remote|public)\.php\/(web)?dav/i).pop()
/files/emma/test
That looks wrong 😟
Test case:
describe('Is the root properly detected?', () => { test('File', () => { const file = new File({ source: 'https://domain.com/remote.php/dav/files/emma/test/emma.jpeg', encodedSource: 'https://domain.com/remote.php/dav/files/emma/test/emma.jpeg', mime: 'image/jpeg', owner: 'emma', }) expect(file.root).toBe('/files/emma') expect(file.dirname).toBe('/test') expect(file.path).toBe('/test/emma.jpeg') }) test('Folder', () => { const file = new Folder({ source: 'https://domain.com/remote.php/dav/files/emma/test/test2', encodedSource: 'https://domain.com/remote.php/dav/files/emma/test/test2', owner: 'emma', }) expect(file.root).toBe('/files/emma') expect(file.dirname).toBe('/test') expect(file.path).toBe('/test/test2') }) })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
nextcloud-files/lib/files/nodeData.ts
Lines 68 to 73 in d3ae6ca
Example URI:
https://domain.com/remote.php/dav/files/emma/test/picture.jpeg
https://domain.com
/remote.php/dav
/files/emma
/test
picture.jpeg
This would be the expected result, according to what I know.
The current implementation uses dirname + split on the dav service to set the root.
For the example URI
'https://domain.com/remote.php/dav/files/emma/test'.split(/(remote|public)\.php\/(web)?dav/i).pop()
/files/emma/test
That looks wrong 😟
Test case:
The text was updated successfully, but these errors were encountered: