Commit graph

158 commits

Author SHA1 Message Date
Côme Chilliet
063d0ff1cd fix: Log missing nodes of shares at debug level
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-12-16 00:25:20 +01:00
Côme Chilliet
aeeea8ccdb fix: Fix orphan shares blocking moving other shares
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-12-16 00:25:20 +01:00
Marcel Müller
76c1bbf48b fix: No IFactory in constructor
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
2025-03-05 11:41:20 +00:00
Joas Schilling
df1f3c1768 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 11:41:20 +00:00
Robin Appelman
e020cbbfe7 fix: make locked exception path relative to the view
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-15 16:51:00 +01:00
Louis Chemineau
ef4281ebe3 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>
2025-02-13 23:37:04 +00:00
Robin Appelman
804a0ec567 fix: explicitly ignore nested mounts when transfering ownership
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-05 09:39:28 +01:00
Robin Appelman
7a37fdddc5 fix: translate mount move error messages
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-05 09:39:28 +01:00
Robin Appelman
5b4ceb0eaa fix: improve checks for moving shares/storages into other mounts
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-05 09:39:28 +01:00
provokateurin
9a728db531 fix(View): Catch exceptions when executing mkdir for non-existent parents
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-12-17 09:38:46 +00:00
Git'Fellow
01596b54c0 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-06 01:59:29 +00:00
provokateurin
77c38979c6 fix(files): Create non-existent parents of mountpoints
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-04 18:02:56 +00:00
Julius Härtl
d76c0d4af6 fix: Do not return partial file info if we have a cache entry
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-07-29 08:16:30 +02:00
Ferdinand Thiessen
824803dd7b 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-24 13:26:40 +00:00
Robin Appelman
4a8eaaf21b fix: forbid moving a folder into a subfolder of itself
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-05-27 12:33:00 +00:00
Côme Chilliet
0b332ceac2 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-04 11:45:22 +02: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 +01: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 +01: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 +01: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 +01: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 +01: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 +01: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 +02: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 +02: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 +02: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 +03:30
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 +02:00
Git'Fellow
951c5b973e
Normalize logical operators
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-05-02 10:10:02 +02: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 +02: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 +02: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 +02: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 +02:00
Côme Chilliet
ea05544213
Fix return type of methods returning false on error
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-03 10:52:34 +02:00
Côme Chilliet
4393b96542
Remove unused method getLocalFolder
It’s not used and not in any OCP interface/class.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-03 10:52:34 +02:00
Côme Chilliet
966a3e6963
Tidy up typing in OC\Files\View
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-03 10:52:33 +02:00
Julius Härtl
d515da502f fix: Use proper path for quota fetching
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-06 22:46:07 +00:00
Robin Appelman
5bcf37b7ff only fetch the data for mounts inside a folder when needed
for most operations we don't actually care about any mounts inside a folder, only for metadata that needs to propagate across storage boundaries (size, etag, mtime) do we need all the submount info.

By only loading this data when needed we can save a bunch of storage setup in a number of cases

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-09 11:39:00 +01:00
Côme Chilliet
028c225d96
Fix psalm errors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:32 +01:00
Côme Chilliet
ff776a90b1
Strong type filesize related methods to ease 32bits problem findings
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:28 +01:00
Côme Chilliet
f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +01:00
Louis Chemineau
66ba90ceff Update cache when file size === 0
The conditions were false when $result === 0.
$results here contains the number of written bits.
The correct way of checking for operation success is to check if $result === false

Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-11-23 12:43:57 +01:00
Carl Schwan
a5ea677370 Rename file1 and file2 to source and target in Storage abstraction
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-18 17:21:47 +02:00
blizzz
ca958de7e9
Merge pull request #33566 from nextcloud/fopen-not-found-rescan
trigger a rescan when trying to fopen a file that exists in cache but not on disk
2022-10-01 21:47:26 +02:00
Carl Schwan
92a5a8f075 Cleanup tags and Share component
- Port to LoggerInterface
- Use IDBConnection and IQueryBuilder instead of raw SQL and OC_DB
- Use IEventListener instead of hooks
- Remove the now unused OC_DB and OC_DB_StatementWrapper legacy utils

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-29 15:15:28 +00:00
Robin Appelman
cb51564356 trigger a rescan when trying to fopen a file that exists in cache but not on disk
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-29 11:17:16 +02:00
Carl Schwan
51b9847fad
Merge branch 'master' into display-name-cache-public
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-15 15:28:30 +02:00
luz paz
368f83095d Fix typos in lib/private subdirectory
Found via `codespell -q 3 -S l10n -L jus ./lib/private`

Signed-off-by: luz paz <luzpaz@github.com>
2022-07-27 08:52:17 -04:00
Robin Appelman
6d6662ec68
expose displayname cache trough a public interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-05-18 03:47:34 +02:00
Côme Chilliet
069477e608
Migrate more classes of lib/private to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-26 16:52:52 +02:00
Vincent Petry
ff385dc679
Merge pull request #32082 from nextcloud/directory-content-lazy-owner
use a lazy user for the file owner when listing a directory
2022-04-25 11:44:44 +02:00