Robin Appelman
36221a8865
add command to write a file
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-05-04 18:21:58 +07:00
Robin Appelman
f9fb102f0b
move get/delete commands to files namespace, make get take the output as argument instead of option
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-05-04 18:21:58 +07:00
Côme Chilliet
88405d320e
Add an error counter
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-04 17:06:46 +07:00
Côme Chilliet
2ffa9fc797
Only show error stack trace on very verbose level
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-02 10:01:38 +07:00
Côme Chilliet
1f83979699
Do not stop at the first PHP error/warning in files:scan
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-27 10:46:37 +07:00
Robin Appelman
54f61352f0
better error messages if the users home is not writable during scanning
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-05 13:21:30 +07:00
EWouters
3a9173cbac
[Fix]: scan-app-data conversion
...
Adapted from sugestions by @Hiyoal in #34283 and @st3iny in #35935 .
See https://github.com/nextcloud/server/issues/34283#issuecomment-1288075064
and https://github.com/nextcloud/server/pull/35935#discussion_r1059905594 .
Closes #34283 .
Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud>
Signed-off-by: EWouters <6179932+EWouters@users.noreply.github.com>
2023-01-03 13:52:34 +07:00
Markus Zeller
15289f9737
Cast to int #32837
...
Signed-off-by: Markus Zeller <git@markuszeller.com>
2022-11-07 16:44:47 +07:00
Carl Schwan
54b6d0708b
Allow scanning for metadata with occ scan:file --generate-metadata
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-10-11 10:41:17 +07:00
luz paz
9d26671f05
Fix typos in apps/ subdirectory
...
Found via `codespell -q 3 -S l10n,./apps/files_external/3rdparty -L adn,ba,boxs,keypair,jus,optionel,ressource,tabel ./apps/`
Signed-off-by: luz paz <luzpaz@github.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-09-05 12:59:54 +07:00
Simon L
de82d4f67c
Merge pull request #32874 from bill-mcgonigle/patch-1
...
Mention missing files subdir
2022-06-17 12:12:25 +07:00
Côme Chilliet
c54fb5f9e6
Use {$var} instead of ${var} for PHP 8.2 compatibility
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-14 15:12:28 +07:00
Bill McGonigle
ad60b3b479
Mention missing files subdir
...
Many users are getting confused by the inaccurate error message "Home storage for user $user not writable" because the storage *is* writable. The actual issue is a missing files/ subdirectory. cf. https://help.nextcloud.com/t/home-storage-for-user-not-writable/10831/7
By mentioning the possible cause in the error message, users are going to be able to rapidly solve their problem rather than bang their heads against the screen, Google, and eventually forums to find out that the error message is wrong in their case.
Yes, it would be better to detect and precisely describe the fault, or fix the problem automatically, but until then, be kind to the users for the next however many years.
2022-06-14 07:10:29 +07:00
cld4h
553239c083
Fix issue #31692 of occ files:scan
...
occ files:scan reports error "Implicit conversion from float XXX to int loses precision"
Signed-off-by: cld4h <20869428+cld4h@users.noreply.github.com>
2022-04-26 14:22:41 +07:00
Côme Chilliet
ea23523c70
Adapt more code to migration to LoggerInterface
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:25 +07:00
Vincent Petry
67ebe75d0e
Move storage encoding compatibility warning logic
...
The encoding check for file names is now happening the Scanner, and an
event will be emitted only if the storage doesn't contain the encoding
compatibility wrapper.
The event is listened to by the occ scan command to be able to display a
warning in case of file name mismatches when they have NFD encoding.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-17 09:24:13 +07:00
Immanuel Pasanec
1f42657bb9
Added support for transfering incoming file shares.
...
- new option --transfer-incoming-shares=1 | 0
- new config.php option 'transfer-incoming-shares' => true | false
The command line option overrules the config.php option.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-08-27 17:55:58 +07:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
dependabot-preview[bot]
eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
...
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard ) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases )
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-02-18 13:31:24 +07:00
Robin Appelman
1ecc02946f
cast ints
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-01-27 18:08:10 +07:00
Robin Appelman
68589f7792
handle the cache where a cache entry with the correct path has already been recreated
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-01-27 16:11:23 +07:00
Robin Appelman
8bd39f081f
also repair storage id
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-01-27 16:11:20 +07:00
Robin Appelman
291b72ec50
add command to repair broken filesystem trees
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-01-27 16:11:16 +07:00
Christoph Wurst
3678823748
Fix database connection usage in the files scanner
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-11 16:45:14 +07:00
Christoph Wurst
9ce3ea3368
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-30 14:07:05 +07:00
Roeland Jago Douma
adc4f1a811
Merge pull request #22916 from J0WI/unifiy-links-to-php.net
...
Unify links to php.net
2020-12-22 09:53:31 +07:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
Sujith Haridasan
08bdc549bb
Stop transfer of ownership between same users
...
Stop the transfer of ownership between same user.
Signed-off-by: Sujith Haridasan <sujith.h@gmail.com>
2020-10-12 09:31:49 +07:00
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +07:00
J0WI
68ce17e59b
Unify links to php.net
...
Update all links to https://www.php.net/
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-09-17 17:40:04 +07:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +07:00
Julius Härtl
479aa975d3
Add removal of mounts without storages to files:cleanup command
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-07 12:36:59 +07:00
Joas Schilling
d7c0b9cced
Also always return in app commands
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 15:12:11 +07:00
Christoph Wurst
cb057829f7
Update license headers for 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +07:00
Daniel Kesselberg
3294f53942
Set exit code if something went wrong.
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-04-26 20:37:21 +07:00
Roeland Jago Douma
e983ae3b06
Add folder argument to files:scan-app-data
...
If you need to rescan something but don't feel like rescanning your
whole preview stash.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-04-22 13:27:33 +07:00
Christoph Wurst
28f8eb5dba
Add visibility to all constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +07:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +07:00
Christoph Wurst
14c996d982
Use elseif instead of else if
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Christoph Wurst
42625a46be
Remove spaces after method or function call
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:05:56 +07:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +07:00
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +07:00
Tobia De Koninck
7c56144f49
Add option to transfer-ownership to move data
...
This will move the home folder of own user to another user. Only allowed
if that other user's home folder is empty.
Can be used as workaround to rename users.
Signed-off-by: Tobia De Koninck <LEDfan@users.noreply.github.com>
2020-02-03 11:15:56 +07:00
Christoph Wurst
1b46621cd3
Update license headers for 18
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-20 09:23:25 +07:00
Christoph Wurst
b81b824da1
Add typed events for the filesystem/scanner
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-13 09:41:05 +07:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Christoph Wurst
07c5f3775c
Extract transfer ownership logic into a reusable service
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-11-26 08:50:19 +07:00
Roeland Jago Douma
68748d4f85
Some php-cs fixes
...
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +07:00
Roeland Jago Douma
fc4c107788
Check quota before transfer ownership
...
Fixes #15664
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-13 11:22:19 +07:00
Joel S
27aafa77db
Fix occ files:scan-app-data elapsed time
...
Signed-off-by: Joel S <joel.devbox@protonmail.com>
2019-02-22 20:55:24 +07:00
Joel S
f29b092a76
Fix-13911-occ-files-scan-elapsed-time
...
Signed-off-by: Joel S <joel.devbox@protonmail.com>
2019-02-22 19:59:03 +07:00
Daniel Kesselberg
ccd89f366d
Merge pull request #11968 from nextcloud/feature/noid/drop-verbose-appscan
...
Replace $verbose with VERBOSITY_VERBOSE for scanFiles method
2018-11-06 14:41:39 +07:00
Daniel Kesselberg
1ad42e8f81
Revert changes not related to $verbose
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-10-22 14:29:49 +07:00
Daniel Kesselberg
1177ad7bb9
Remove quiet and verbose from Command/Scan
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-10-21 22:15:10 +07:00
Daniel Kesselberg
816fbf9b9f
Replace $verbose with VERBOSITY_VERBOSE for scanFiles method
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-10-21 22:15:10 +07:00
Daniel Kesselberg
2422dfe619
Replace $verbose with VERBOSITY_VERBOSE for scanFiles method
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-10-21 22:06:44 +07:00
Daniel Kesselberg
311de17730
Rename method to abortIfInterrupted
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-10-08 13:05:00 +07:00
Daniel Kesselberg
752f637207
Adjust code for changed method signature
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2018-10-07 18:17:29 +07:00
Daniel Calviño Sánchez
30d8e3ee05
Transfer room shares too with the "files:transfer-ownership" command
...
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-08-08 14:25:43 +07:00
Daniel Calviño Sánchez
b7474ed482
Fix transfering ownership of a share to user with same id as receiver
...
When the ownership of a user share is transfered to the receiver the
share is removed, as the receiver now owns the original file. However,
due to a missing condition, any share with a group, link or remote with
the same id as the user was removed, not only the user shares.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-24 15:05:42 +07:00
Robin Appelman
b9e685236f
Add option to only scan the home storage
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-06-28 16:09:25 +07:00
Blaok
21b9ad3978
feat: allow files:scan --shallow
...
Signed-off-by: Yuze Chi <i@blaok.me>
2018-05-18 14:50:32 +07:00
Morris Jobke
a661f043e1
Remove unneeded semicolon and parentheses
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 23:46:40 +07:00
Roeland Jago Douma
f55732a18f
Merge pull request #7075 from nextcloud/remove-unused-variables
...
Remove unused variables
2017-11-07 16:18:40 +07:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +07:00
Morris Jobke
5445b1ff17
Remove unused variables
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 09:43:45 +07:00
Morris Jobke
c54a59d51e
Remove unused use statements
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-22 19:23:31 +07:00
Morris Jobke
fbedea0807
Add PHPDoc and handle exception in ScanAppData as well
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-19 17:04:16 +07:00
Robin Appelman
ce2dba0796
show error when trying to scan non existing path
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-04-19 14:36:38 +07:00
Morris Jobke
d2654c8aea
Merge pull request #3965 from nextcloud/downstream-27343
...
Providing --path option to transfer-ownership
2017-03-23 15:20:53 +07:00
Morris Jobke
fbf3bfa3ea
improve file transfer code
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-22 17:40:36 +07:00
Morris Jobke
b26c8f8bd3
Use proper name and code style
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-22 15:59:55 +07:00
Roeland Jago Douma
e3f8e416e6
Add files:scanAppData command
...
Fixes https://github.com/nextcloud/server/issues/3041
Add a dedicated command to scan the special appdata dir
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-22 21:30:44 +07:00
Sujith H
f654f29532
Providing --path option to transfer-ownership
...
This will help user to selectively move the folders
specified using --path option, instead of moving
entire folder under files directory.
Signed-off-by: Sujith H <sharidasan@owncloud.com>
Update the integration test for transfer-ownership
Update the integration test for transfer-ownership
as the new option --path is introduced in the command.
Signed-off-by: Sujith H <sharidasan@owncloud.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 18:29:21 +07:00
Vincent Petry
b8a8f43fce
Log files:scan exception, add InterruptedException
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 02:24:28 +07:00
Morris Jobke
503a9160ae
Use a proper date format for transfer ownership
...
* on Windows : is not allowed as filename and doesn't get synced then
* uses 2017-03-02 22-00-00 instead of 2017-03-02T22:00:00+00:00 as format
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-02 22:36:18 +07:00
Morris Jobke
e8511660f0
Merge pull request #2109 from nextcloud/oc_26533
...
Transfer ownership only analyze home storage
2016-11-18 15:32:28 +07:00
Roeland Jago Douma
7e6830729e
Test on storage
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-15 09:53:43 +07:00
Morris Jobke
e5b61527da
Merge pull request #2125 from nextcloud/downstream-26546
...
Transfer ownership now returns exit code on error
2016-11-15 00:08:09 +07:00
Roeland Jago Douma
561a4fd989
Merge pull request #2115 from nextcloud/oc_26527
...
Skip broken shares when transferring ownership (#26527 )
2016-11-14 17:07:59 +07:00
Vincent Petry
1355f2039e
Transfer ownership now returns exit code on error ( #26546 )
2016-11-14 16:57:18 +07:00
Vincent Petry
2b61b89391
Skip broken shares when transferring ownership ( #26527 )
2016-11-14 15:18:34 +07:00
Vincent Petry
3fe7186e31
First process group shares and then user shares
...
This prevents a validation failure where the code checks whether a file
is already shared with another user, but the check disables itself when
the owner is the same. Processing the groups first prevents the check
to kick in too early when the group share still has the old owner while
we try transferring the user share.
2016-11-14 14:39:17 +07:00
Vincent Petry
f31b794add
Transfer ownership only analyze home storage
...
When transferring ownership, only the local files will be transferred
during the rename operation. This means that the analyzing code doesn't
need to recurse into any mount points.
Furthermore this fixes issues where FailedStorage might appear as mount
points as a result of inaccessible external storages or shares. So this
makes it more robust.
2016-11-14 14:34:30 +07:00
Vincent Petry
f737426eca
Add using casing check/fix for initMountPoints
2016-11-02 22:21:46 +07:00
Joas Schilling
77a5491d9d
Make sure the UID is correctly cased
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-17 13:41:38 +07:00
Thomas Müller
a4cf4a53f3
Before a user is getting scanned the database connection is re-established
2016-08-29 14:49:55 +07:00
Joas Schilling
0215b004da
Update with robin
2016-07-21 18:13:58 +07:00
Joas Schilling
813f0a0f40
Fix apps/
2016-07-21 18:13:57 +07:00
Lukas Reschke
aba539703c
Update license headers
2016-05-26 19:57:24 +07:00
Robin Appelman
f313105dbd
add "unscanned" option to files:scan to triger a background scan
2016-05-19 14:19:09 +07:00
Joas Schilling
b34bacd071
Move Files app to PSR-4 ( #24569 )
...
* Move lib/ of Files app to PSR-4
* Move tests to PSR-4
2016-05-12 12:07:06 +07:00