aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
Commit message (Collapse)AuthorAgeFilesLines
* fix(node): emit hooks on `Node::copy()`Jonas2025-05-271-2/+2
| | | | | | | | | | | | | | | | | When calling `Files\Node\Node::copy()`, `Files\View::copy()` gets called, but `Files\View::fakeRoot` is empty so the hooks are not emitted if no path is given to `Files\View::shouldEmitHooks()`. This results in node-related events like `NodeCopiedEvent` not being fired when copying files via `Files\Node\Node::copy()`. `Files\View::shouldEmitHooks()` is given a path as parameter in almost all places except when called from the `copy()` function. This commit changes it and passes the copy target path. Fixes: nextcloud/collectives#1756 Signed-off-by: Jonas <jonas@freesources.org>
* chore: move streamCopy implementation from `OC_Helper` to `OCP\Files`Ferdinand Thiessen2025-05-161-1/+2
| | | | | | | | | The function was already there but called the legacy version. So moved the implementation and migrated all usages of it. Sadly the interface was slightly different so adjusted it to be compatible with both legacy and the OCP one. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: create mountpoint folder even if the user has a quota of 0mountpoint-mkdir-quotaRobin Appelman2025-05-081-0/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: don't construct storage when checking if a sub-mount is applicablesub-mount-filter-no-storageRobin Appelman2025-04-081-2/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: No IFactory in constructorbugfix/50619/no-session-work-in-constructorMarcel Müller2025-03-051-3/+1
| | | | Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
* fix(files): Don't do session related work in the constructor of the ViewJoas Schilling2025-03-051-10/+10
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix: make locked exception path relative to the viewRobin Appelman2025-02-111-16/+8
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: Harden files scanner for invalid null accessFerdinand Thiessen2025-01-281-5/+5
| | | | | | Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: explicitly ignore nested mounts when transfering ownershipmount-move-checksRobin Appelman2025-01-061-3/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: translate mount move error messagesRobin Appelman2025-01-031-11/+36
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: improve checks for moving shares/storages into other mountsRobin Appelman2025-01-031-15/+51
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(View): Catch exceptions when executing mkdir for non-existent parentsfix/view/catch-mkdir-exception-non-existent-parentsprovokateurin2024-12-161-4/+11
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(files): Correctly copy the cache information on copy operationsLouis Chemineau2024-12-031-1/+9
| | | | | | Needed to copy the `encrypted` flag of encrypted files when those files are two level down in a moved folder. Signed-off-by: Louis Chemineau <louis@chmn.me>
* fix(Files): Handle getOwner() returning falsefix/storage/get-owner-falseprovokateurin2024-09-171-7/+33
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(Storage): Document getOwner() can return falseprovokateurin2024-09-171-3/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(files): Check if the target path is a descendant of the shared folder pathGit'Fellow2024-09-051-1/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: fix tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: add tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: tests
* Merge pull request #47417 from nextcloud/fix/files/create-mountpoint-parentsKate2024-09-041-0/+9
|\
| * fix(files): Create non-existent parents of mountpointsprovokateurin2024-08-221-0/+9
| | | | | | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* | Merge pull request #47546 from nextcloud/fix/files-view-error-messagesAndy Scherzinger2024-08-291-3/+3
|\ \ | | | | | | fix: Adjust filename validation messages
| * | fix: Adjust filename validation messagesFerdinand Thiessen2024-08-271-3/+3
| | | | | | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | | fix: Allow read-only filename validation to allow reading filesFerdinand Thiessen2024-08-281-1/+12
|/ / | | | | | | | | | | Needed to read files with the "Windows compatibility" feature. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* / style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-6/+6
|/ | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Merge pull request #46672 from nextcloud/fix/preview-invalid-idAndy Scherzinger2024-07-251-3/+4
|\ | | | | Avoid using partial file info as valid one
| * fix: Do not return partial file info if we have a cache entryJulius Härtl2024-07-221-3/+4
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | fix: FileInfo from `View` should have the correct name of a mountpointFerdinand Thiessen2024-07-221-0/+4
|/ | | | | | | | | | If a mountpoint is returned from a `View` the name must match the view scoped name and not the global name. For example group folders have a name like `1` or `2` (the ID), but the name of the FileInfo returned fro mthe View should be the mount point name, like `First groupfolder` or similar. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* refactor: Migrate some legacy and core functions to `IFilenameValidator`Ferdinand Thiessen2024-07-191-0/+6
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* refactor: Migrate filename validation logic from `Storage` to ↵Ferdinand Thiessen2024-07-161-2/+6
| | | | | | `FilenameValidator` Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Merge pull request #45014 from nextcloud/forbid-moving-subfolderRobin Appelman2024-05-271-0/+6
|\ | | | | fix: forbid moving a folder into a subfolder of itself
| * fix: forbid moving a folder into a subfolder of itselfRobin Appelman2024-05-171-0/+6
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | chore: Add SPDX headerAndy Scherzinger2024-05-241-43/+4
|/ | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Avoid updating size when calling touch on a fileJulius Härtl2024-05-081-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-4/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: ensure nested mount points are handled in the correct orderRobin Appelman2024-03-181-0/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Refactor `OC\Server::getLockingProvider`Andrew Summers2024-03-151-1/+1
| | | | Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
* fix: update "move into share" check to share managerRobin Appelman2024-02-271-24/+29
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: Replace OC::$server->getL10N by OCP\Util::getL10N in lib and some appsCôme Chilliet2024-02-051-5/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* perf: Avoid updating the folder size if we know the size differenceJulius Härtl2024-01-121-3/+5
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-2/+2
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* reuse sharing disabled state when listing folder contentRobin Appelman2023-10-191-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Detect aborted connection in OC\Files\View and stop writing data to the ↵Benjamin Gaussorgues2023-09-071-2/+12
| | | | | | output buffer Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix: don't emit Hooks when hookpaths are emptyAnna Larch2023-08-171-16/+24
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-151-2/+2
| | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* Merge pull request #37943 from nextcloud/fix/fix-getcontent-return-typeArthur Schiwon2023-05-031-1/+1
|\ | | | | Fix file_get_content signatures to make it clear it can return false
| * Fix file_get_content signatures to make it clear it can return falseCôme Chilliet2023-04-271-1/+1
| | | | | | | | | | | | | | In File::getContent, which must return a string, throw an Exception instead of returning false. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Normalize logical operatorsGit'Fellow2023-05-021-13/+13
|/ | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Remove unecessary fully qualified namespaces from phpdocCôme Chilliet2023-04-051-4/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* View needs to return an instance of OC\Files\FileInfo explicitelyCôme Chilliet2023-04-031-5/+2
| | | | | | | | Applications are calling methods from the class which are not from the public interface, and which cannot be added easily to public interface because Node interface extends FileInfo. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* More type cleanup in View and FileInfoCôme Chilliet2023-04-031-77/+68
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix return type of methods returning false on errorCôme Chilliet2023-04-031-4/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Remove unused method getLocalFolderCôme Chilliet2023-04-031-14/+0
| | | | | | It’s not used and not in any OCP interface/class. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>