Carl Schwan
f450cda3aa
chore: Explicitely mark \OC\Files\View as internal
...
It's in OC and should not be used at all. Marking it as internal will
at least prevent new code to use it.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-06 15:49:55 +07:00
Robin Appelman
5987584b90
perf: use more optimized node-by-id logic in View::getPath
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-08-13 19:42:42 +07:00
Jonas
c952570e67
fix(node): emit hooks on `Node::copy()`
...
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>
2025-05-27 12:14:14 +07:00
Ferdinand Thiessen
01db539d0a
chore: move streamCopy implementation from `OC_Helper` to `OCP\Files`
...
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>
2025-05-16 13:03:05 +07:00
Robin Appelman
cd75876c1e
fix: create mountpoint folder even if the user has a quota of 0
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-08 15:15:36 +07:00
Robin Appelman
c1dbc27fd6
fix: don't construct storage when checking if a sub-mount is applicable
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-04-08 18:21:41 +07:00
Marcel Müller
3391279068
fix: No IFactory in constructor
...
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
2025-03-05 11:04:55 +07:00
Joas Schilling
0522b0373e
fix(files): Don't do session related work in the constructor of the View
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-03-05 09:06:16 +07:00
Robin Appelman
9e1ae74a1c
fix: make locked exception path relative to the view
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-11 14:38:27 +07:00
Ferdinand Thiessen
b48ee2e924
fix: Harden files scanner for invalid null access
...
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>
2025-01-28 20:08:46 +07:00
Robin Appelman
757076af29
fix: explicitly ignore nested mounts when transfering ownership
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-06 14:45:35 +07:00
Robin Appelman
d6418fcd99
fix: translate mount move error messages
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-03 15:36:38 +07:00
Robin Appelman
16d0363937
fix: improve checks for moving shares/storages into other mounts
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-03 15:36:32 +07:00
provokateurin
4bc0b58c59
fix(View): Catch exceptions when executing mkdir for non-existent parents
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-12-16 16:00:35 +07:00
Louis Chemineau
199b0bd4d9
fix(files): Correctly copy the cache information on copy operations
...
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>
2024-12-03 17:04:44 +07:00
provokateurin
dc13f9cc1e
fix(Files): Handle getOwner() returning false
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-17 10:10:50 +07:00
provokateurin
8ca6fcace7
fix(Storage): Document getOwner() can return false
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-17 10:10:50 +07:00
Git'Fellow
0308001118
fix(files): Check if the target path is a descendant of the shared folder path
...
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
2024-09-05 23:54:01 +07:00
Kate
09fef8f0ec
Merge pull request #47417 from nextcloud/fix/files/create-mountpoint-parents
2024-09-04 20:00:24 +07:00
Andy Scherzinger
bfb5835750
Merge pull request #47546 from nextcloud/fix/files-view-error-messages
...
fix: Adjust filename validation messages
2024-08-29 23:28:50 +07:00
Ferdinand Thiessen
08836696e2
fix: Allow read-only filename validation to allow reading files
...
Needed to read files with the "Windows compatibility" feature.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-28 17:22:20 +07:00
Ferdinand Thiessen
81c6c24cd5
fix: Adjust filename validation messages
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-27 23:12:24 +07:00
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
provokateurin
ebfbe99652
fix(files): Create non-existent parents of mountpoints
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-08-22 12:04:31 +07:00
Andy Scherzinger
4f2a29adf9
Merge pull request #46672 from nextcloud/fix/preview-invalid-id
...
Avoid using partial file info as valid one
2024-07-25 19:37:30 +07:00
Julius Härtl
2b0bc8b310
fix: Do not return partial file info if we have a cache entry
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-07-22 22:32:34 +07:00
Ferdinand Thiessen
12796c3ae7
fix: FileInfo from `View` should have the correct name of a mountpoint
...
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>
2024-07-22 22:01:12 +07:00
Ferdinand Thiessen
9716b0d735
refactor: Migrate some legacy and core functions to `IFilenameValidator`
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-19 19:41:46 +07:00
Ferdinand Thiessen
69341e4306
refactor: Migrate filename validation logic from `Storage` to `FilenameValidator`
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-16 12:49:09 +07:00
Robin Appelman
d87c23242b
Merge pull request #45014 from nextcloud/forbid-moving-subfolder
...
fix: forbid moving a folder into a subfolder of itself
2024-05-27 14:29:34 +07:00
Andy Scherzinger
dae7c159f7
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Robin Appelman
66d36bffa6
fix: forbid moving a folder into a subfolder of itself
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-05-17 17:45:44 +07:00
Julius Härtl
24e0d5023c
fix: Avoid updating size when calling touch on a file
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-05-08 11:50:20 +07:00
Côme Chilliet
ec5133b739
fix: Apply new coding standard to all files
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Robin Appelman
afb589a69b
fix: ensure nested mount points are handled in the correct order
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-18 18:13:31 +07:00
Andrew Summers
45eb4a839d
Refactor `OC\Server::getLockingProvider`
...
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2024-03-15 13:11:33 +07:00
Robin Appelman
96942e436b
fix: update "move into share" check to share manager
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-27 14:15:23 +07:00
Côme Chilliet
b2e9e0fa0d
chore: Replace OC::$server->getL10N by OCP\Util::getL10N in lib and some apps
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-05 11:16:04 +07:00
Julius Härtl
cc75294eb6
perf: Avoid updating the folder size if we know the size difference
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-01-12 14:21:08 +07:00
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Robin Appelman
9bc44de95d
reuse sharing disabled state when listing folder content
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-10-19 19:40:52 +07:00
Benjamin Gaussorgues
003d0dec93
Detect aborted connection in OC\Files\View and stop writing data to the output buffer
...
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-09-07 09:32:32 +07:00
Anna Larch
556f29bef5
fix: don't emit Hooks when hookpaths are empty
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-08-17 09:32:14 +07:00
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
...
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +07:00
Arthur Schiwon
997efe44ff
Merge pull request #37943 from nextcloud/fix/fix-getcontent-return-type
...
Fix file_get_content signatures to make it clear it can return false
2023-05-03 10:34:51 +07:00
Git'Fellow
951c5b973e
Normalize logical operators
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-05-02 10:10:02 +07:00
Côme Chilliet
546d94c3ec
Fix file_get_content signatures to make it clear it can return false
...
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>
2023-04-27 09:56:05 +07:00
Côme Chilliet
6633b4ced6
Remove unecessary fully qualified namespaces from phpdoc
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 09:13:39 +07:00
Côme Chilliet
5ad045619c
View needs to return an instance of OC\Files\FileInfo explicitely
...
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>
2023-04-03 10:52:35 +07:00
Côme Chilliet
0b3dad895f
More type cleanup in View and FileInfo
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-03 10:52:35 +07:00