Vincent Petry
7c9405a921
Disable filesystem_check_changes by default
...
This will prevent detecting remote changes done in the data folder /
root storage by default. In the rare cases where the data folder is
shared with other apps/users outside ownCloud and change detection is
needed, the admin will have to set the option explicitly from now on.
Note that this doesn't affect external storages which have their own
setting in the mount options.
2015-07-29 12:01:12 +02:00
Bjoern Schiessle
fb4c99fe06
make sure that we emit the hooks if a file gets moved from a subfolder to the root folder with the nodes API
2015-07-29 11:02:38 +02:00
Morris Jobke
c34e63bb1f
Merge pull request #15543 from rullzer/mimetypedetector
...
Mimetypedetector
2015-07-28 13:35:26 +02:00
Vincent Petry
6ada1e3276
Merge pull request #17902 from owncloud/fix_17898
...
get header size before we open the file to avoid locking exception
2015-07-27 16:58:32 +02:00
Thomas Müller
68f14a943a
Merge pull request #17840 from owncloud/fix-enc-wrapper-without-encryption
...
Only set is encrypted when encryption is enabled
2015-07-27 16:06:39 +02:00
Roeland Jago Douma
d276aebf40
Pass config dir as parameter to detection class
...
In order to properly test the mimetype function:
* constructor takes path to configdir
* Added unit tests for mimetype (only if vfsStream is available)
2015-07-27 14:59:49 +02:00
Roeland Jago Douma
88fb389eab
Proper deprecate methods
2015-07-27 14:59:49 +02:00
Roeland Jago Douma
9cdd637050
Loading of mapping/aliases is done in class
2015-07-27 14:59:49 +02:00
Roeland Jago Douma
141a0f0f47
Move mimetypedetection to files/type/detection
2015-07-27 14:59:45 +02:00
Roeland Jago Douma
6db6689740
Added mimetype detector
...
* Copied unit tests from old functions
2015-07-27 14:58:45 +02:00
Bjoern Schiessle
0736b45d92
get header size before we open the file to avoid locking exception
2015-07-27 14:29:07 +02:00
Robin Appelman
f74525c349
check if the user is trying to scan a valid path
2015-07-27 11:21:48 +02:00
Joas Schilling
9cee8ff9f8
Only set is encrypted when encryption is enabled
2015-07-23 15:18:59 +02:00
Robin McCorkell
75a5e6e12b
Fix mounting wrapped storages resulting in many-layered wrapping
...
This usually doesn't cause issues, but in unit tests sometimes a wrapped
storage is passed to Filesystem::mount() and gets rewrapped, hitting the
XDebug function nesting level limit when used.
2015-07-20 16:27:26 +01:00
Robin McCorkell
df19cabb44
Store storage availability in database
...
Storage status is saved in the database. Failed storages are rechecked every
10 minutes, while working storages are rechecked every request.
Using the files_external app will recheck all external storages when the
settings page is viewed, or whenever an external storage is saved.
2015-07-20 16:27:26 +01:00
Björn Schießle
f363fc2d4a
Merge pull request #17540 from owncloud/enc_detect_legacy_files2
...
make sure that we always detect legacy files correctly
2015-07-17 21:42:32 +02:00
Bjoern Schiessle
16d8014cdd
set targetIsEncrypted to true if file cache indicates that we try to read a encrypted file
2015-07-17 13:30:08 +02:00
Bjoern Schiessle
a2e2005e67
make sure that we always detect legacy files correctly
2015-07-17 13:30:08 +02:00
Morris Jobke
3fae984b56
Merge pull request #17282 from owncloud/s2s-catchremotelockexceptions
...
Throw lock exceptions if remote share returned 423 status code
2015-07-17 11:34:34 +02:00
Robin Appelman
da951ba059
Use the new IteratorDirectory instead of the fakedir wrapper
2015-07-15 13:57:53 +02:00
Vincent Petry
f62d94c4ff
Throw StorageNotAvailable if propfind on root failed
...
If PROPFIND fails with 404 or 405 on the remote share root, it means the
storage is not available. Throw StorageNotAvailable is such case.
2015-07-13 18:28:53 +02:00
Morris Jobke
1006ec56ce
Merge pull request #17481 from rullzer/mimetype-list
...
Move mimetypes.list.php to config/mimetypemapping.dist.json
2015-07-13 08:31:18 +02:00
Morris Jobke
d52e197b0d
Merge pull request #16965 from owncloud/getUserFolder-in-IRootFolder
...
Add getUserFolder to IRootFolder
2015-07-09 14:29:47 +02:00
tbartenstein
c48e00294c
Update fileinfo.php
...
Edits isMounted() to remove the check for 'local' prefix, so that folder icons are displayed correctly (see issue #10712 )
2015-07-08 18:48:11 +02:00
Roeland Jago Douma
35fba1ef9f
Move mimetypes.list.php to config/mimetypemapping.json
...
This allows users to add new mimetypemappings (extention -> mimetype)
themself. And not have to wait until a new release for updated
mimetypes.
Fixes : #15384
2015-07-08 13:18:58 +02:00
Thomas Müller
9120942bcf
Merge pull request #16924 from owncloud/copy-recursive-polyfill
...
add recursive copy polyfill for storage backends
2015-07-06 17:05:36 +02:00
Thomas Müller
d3ac73c0c9
Remove OC_Log
2015-07-03 18:00:16 +02:00
Vincent Petry
3df27a01be
Merge pull request #17379 from owncloud/kill-file-mapper
...
Remove file mapper - was only use in Windows and never worked properly
2015-07-03 17:53:47 +02:00
Robin Appelman
de4e4cb6ea
also dont download existing on fopen when using w+ and wb+
2015-07-03 15:53:02 +02:00
Robin Appelman
6cc65b53ab
add phpdoc
2015-07-03 15:53:02 +02:00
Robin Appelman
232872e401
add flysystem adapater
2015-07-03 15:53:02 +02:00
Thomas Müller
f55aa856ad
Remove file mapper - was only use in Windows and never worked properly
2015-07-03 15:41:29 +02:00
Robin Appelman
b849b7c7f2
better handling of folders
2015-07-03 13:43:22 +02:00
Morris Jobke
3e97ca3b96
Add getUserFolder to IRootFolder
...
* untangle DI of user specific folders
* allows to autodetect the dependency
2015-07-03 11:11:58 +02:00
Vincent Petry
f70791653c
Merge pull request #17291 from owncloud/mount-manager-public
...
expose the mount manager in the public api
2015-07-03 07:57:31 +02:00
Vincent Petry
34043d4647
Throw lock exceptions if remote share returned 423 status code
2015-07-03 07:51:13 +02:00
Morris Jobke
f5c57e076e
Merge pull request #17077 from owncloud/files-scan-absolute-path
...
fix getting mount points when passing a path to the files:scan command
2015-07-02 13:02:20 +02:00
Robin Appelman
57945dbc4b
fix typehinting
2015-07-01 16:13:33 +02:00
Robin Appelman
faf642c31d
expose the mount manager in the public api
2015-07-01 15:57:04 +02:00
Morris Jobke
1469177a3a
Merge pull request #16406 from owncloud/enc-strlenperffix
...
Small perf tweak in strlen loop
2015-07-01 08:54:33 +02:00
Vincent Petry
16ff6cff54
Merge pull request #17256 from owncloud/locking-disablecallbackwrapperwhendisabled
...
Do not set callback wrapper when locking is disabled
2015-06-30 18:28:28 +02:00
Vincent Petry
0118bf04dc
Merge pull request #17251 from owncloud/issue-17247-filesize-stat-failed-for-in-log
...
Perform the filesize on the file that exists
2015-06-30 14:51:29 +02:00
Vincent Petry
afd83caf69
Do not set callback wrapper when locking is disabled
2015-06-30 13:45:41 +02:00
Joas Schilling
9c533342fc
Perform the filesize only when the file exists
...
Regression from 95602d4069
and 9b336765b6
2015-06-30 11:47:58 +02:00
Vincent Petry
167f57c15e
Unlock first path on rename if second path is locked
2015-06-29 17:31:14 +02:00
Robin Appelman
8a2ef26b5e
handle invalid results from mount providers
2015-06-29 14:42:34 +02:00
Joas Schilling
70eb20e3a7
Merge pull request #17030 from owncloud/lock-posthooks
...
Keep shared lock for post-hooks
2015-06-29 14:17:03 +02:00
Robin Appelman
786ec82a61
add unit test
2015-06-29 14:06:29 +02:00
Robin Appelman
8ec7e9fac7
fix getting mount points when passing a path to the files:scan command
2015-06-29 14:03:23 +02:00
Lukas Reschke
d1f0ff372e
Merge pull request #17163 from owncloud/update-licenses
...
Update license headers
2015-06-27 20:22:23 +02:00
Vincent Petry
271ef9dedb
Remove test-specific method to make Bjoern and Joas happy
2015-06-26 17:37:04 +02:00
Joas Schilling
9b336765b6
Correctly check if the real file exists, otherwise try the part file
2015-06-26 13:17:23 +02:00
Vincent Petry
538e466c30
Keep shared locks in post hooks
...
Instead of unlocking after the file operation, change exclusive locks
back to shared locks during post hooks, and unlock after that.
Also added unit tests to test locking in pre-hooks, during operation and
post-hooks.
2015-06-25 16:33:02 +02:00
Morris Jobke
f63915d0c8
update license headers and authors
2015-06-25 14:13:49 +02:00
Vincent Petry
58439c337c
Merge pull request #17070 from owncloud/lock-movemountbug
...
Lock correct paths when moving mount
2015-06-24 18:37:48 +02:00
Morris Jobke
5f59393b30
Merge pull request #17110 from owncloud/share-error-handling
...
[sharing] handle shares of users that aren't available anymore
2015-06-24 17:38:34 +02:00
Vincent Petry
8859004a2b
Rollback folder scan if an entry was locked
2015-06-24 15:42:00 +02:00
Vincent Petry
35047a2300
Fix locked paths in the moveMount case
...
When moving a mount point directly, the lock must be applied on the
local mount point path instead of the attached storage root.
Other operations will still lock the attached storage root.
2015-06-24 11:33:28 +02:00
Morris Jobke
4f2f8a6f28
[sharing] handle shares of users that aren't available anymore
...
* properly handle the case where an abandoned share is left and
simply skip it
2015-06-23 18:22:36 +02:00
Morris Jobke
02b2b60581
Merge pull request #17095 from owncloud/proper-error-handling
...
Proper error handling
2015-06-23 17:40:55 +02:00
Björn Schießle
cce841c665
Merge pull request #17045 from owncloud/enc_improvements
...
encryption improvements
2015-06-23 14:30:21 +02:00
Bjoern Schiessle
95602d4069
make sure that we always read the header from the original file
2015-06-23 11:41:21 +02:00
Morris Jobke
fdd01cf15c
Added error message on initMountpoints exception
2015-06-23 09:54:03 +02:00
Thomas Müller
ced15c44b4
Merge pull request #16657 from owncloud/view-emit-path
...
emit hooks from a view as long as the path is inside the default root
2015-06-22 11:29:11 +02:00
Vincent Petry
6697f9524c
Merge pull request #16963 from owncloud/fileinfo-lock
...
Acquire read lock when getting file or directory info
2015-06-18 18:27:20 +02:00
Robin Appelman
17be0993b4
remove unneeded normalize
2015-06-18 15:33:44 +02:00
Robin Appelman
6018567df2
unlock the file if the file doesnt exists
2015-06-18 15:26:17 +02:00
Robin Appelman
d7960d5db6
dont update the cache on rename fail
2015-06-18 14:45:13 +02:00
Robin Appelman
2a50dbd1a1
update noopscanner
2015-06-18 14:42:48 +02:00
Robin Appelman
3e54696f7f
extends phpdoc
2015-06-18 14:30:25 +02:00
Robin Appelman
3526b352dc
update the file cache within the write lock
2015-06-18 13:47:03 +02:00
Robin Appelman
72eedda16c
use old cache data when locked
2015-06-17 14:13:10 +02:00
Thomas Müller
d2305f2527
Merge pull request #16729 from owncloud/scanner-read-lock
...
keep a read lock while scanning a file or folder
2015-06-17 11:52:54 +02:00
Vincent Petry
102c6ffc41
Normalize path in View's lock methods
2015-06-16 17:03:12 +02:00
Vincent Petry
e5d34a2733
Merge pull request #16892 from owncloud/lock-returnfullpath
...
Rethrow LockedException with full path
2015-06-16 16:47:10 +02:00
Vincent Petry
0e3a3dd5d7
Rethrow LockedException with full path
...
Because the path is converted to md5 from the original exception,
rethrow the exception with the correct full path
2015-06-16 10:48:31 +02:00
Robin Appelman
4b181f73ca
phpdoc
2015-06-15 15:41:52 +02:00
Robin Appelman
567df226e5
fix check if hooks should be emited in runHooks
2015-06-15 15:07:48 +02:00
Robin Appelman
9c0d69a3b2
ensure normalized path form when changing locks
2015-06-15 14:32:29 +02:00
Robin Appelman
a4f808b11d
properly unlock in case of failed fopen
2015-06-15 14:32:29 +02:00
Robin Appelman
7d72f7d8ce
keep a read lock while scanning a file or folder
2015-06-15 14:32:29 +02:00
Thomas Müller
911c43e5f9
Merge pull request #16727 from owncloud/file-put-content-lock
...
add proper locking to file_put_contents when using streams
2015-06-15 14:22:06 +02:00
Robin Appelman
2fb8a76705
add recursive copy polyfill for storage backends
2015-06-14 15:15:21 +02:00
Vincent Petry
4497aa4c68
Webdav PUT small file lock must be shared during hooks
...
Fixed code path for Webdav PUT of small files to use shared locks during
hook execution, and exclusive during the file operation
This makes it possible for versions to be copied by accessing the file
in a post_write hook.
2015-06-12 18:52:18 +02:00
Joas Schilling
5586b2db09
Don't use limit on explode to have only 1 code path
2015-06-12 11:58:26 +02:00
Joas Schilling
a7d2b3b9ae
Add return value to lock methods and check it in tests
2015-06-12 11:41:05 +02:00
Joas Schilling
caf16b083e
Only lock files in data/username/files/
2015-06-12 11:09:38 +02:00
Thomas Müller
a968b8409d
Merge pull request #16158 from owncloud/mountprovider-after-setup
...
Call newly registered mount providers after the filesystem is setup
2015-06-08 13:42:02 +02:00
Joas Schilling
bb0cb0aaec
Merge pull request #15895 from owncloud/dav-getremoteetag
...
Get etag from remote OC server
2015-06-03 17:20:25 +02:00
Robin Appelman
bcf13aff6f
change lock back to shared before updating the cache
2015-06-03 17:18:50 +02:00
Robin Appelman
6b0874203d
add proper locking to file_put_contents when using streams
2015-06-03 17:18:50 +02:00
Robin Appelman
0497534a6e
more type hints
2015-06-02 14:07:55 +02:00
Robin Appelman
8926bca0c7
phpdoc, strict and type hints
2015-06-02 14:07:55 +02:00
Robin Appelman
6f47a547d8
only use mount provider if we have a valid user
2015-06-02 14:07:54 +02:00
Robin Appelman
24131586d7
call mount providers that are registered after the filesystem is setup
2015-06-02 14:07:54 +02:00
Robin Appelman
4b48dd424f
emit hooks from a view as long as the path is inside the default root
2015-06-02 14:07:20 +02:00
Thomas Müller
3ebc8f0564
Merge pull request #16107 from owncloud/fix-getLocalFile-encryption-master
...
Fix get local file encryption master
2015-06-02 13:47:37 +02:00
Vincent Petry
30d7f92763
Get etag from remote OC server
2015-06-02 11:42:03 +02:00
Robin Appelman
ce04cf6610
shared lock around hooks
2015-06-01 13:24:02 +02:00
Robin Appelman
661c9e2444
add changeLock to the storage api
2015-06-01 13:24:02 +02:00