Commit Graph

414 Commits

Author SHA1 Message Date
Bjoern Schiessle 84d36df70b make sure that we always return the correct permissions 2014-06-24 13:39:37 +02:00
Jörn Friedrich Dreyer 28c1a95575 use common storage test 2014-06-23 16:29:01 +02:00
Jörn Friedrich Dreyer 7ec53571c4 use 'object' as the fakedir stream name 2014-06-23 11:07:01 +02:00
Jörn Friedrich Dreyer c112a1d323 move to stream based IObjectStore interface, rearrange & reformat code 2014-06-20 12:27:47 +02:00
Jörn Friedrich Dreyer f2fe00e972 fix rebase, use 'object::user:<username>' or 'object::store:<storageid> as storage id, by default use container/bucket name for storageid, make storageid configurable, store user only for HomeObjectStoreStorage, change updateObject() to writeObject() 2014-06-18 15:20:26 +02:00
Jörn Friedrich Dreyer 5cae863408 change architecture from inheritance to composition 2014-06-18 12:53:20 +02:00
Jörn Friedrich Dreyer 9335a5f07f remove duplicate method 2014-06-18 12:53:20 +02:00
Jörn Friedrich Dreyer 5722e31d1a add autocreate config option for containers, implement autocreate and delete of containers, use generated container names for tests 2014-06-18 12:53:20 +02:00
Jörn Friedrich Dreyer 4e65889f54 only use one config option 'objectstore' for root and home storage configuration 2014-06-18 12:53:20 +02:00
Jörn Friedrich Dreyer 7493ff0624 fix unit test by always initializing the root of the storage in the constructor 2014-06-18 12:53:20 +02:00
Jörn Friedrich Dreyer 10de4a7b90 move creation of / and users 'files' from storage constructor to setupFS / mount initialization 2014-06-18 12:53:20 +02:00
Jörn Friedrich Dreyer 87aaf39259 fix checking unset array values, deduplicate code, remove file from cache if it could not be stored in the objectstore 2014-06-18 12:53:20 +02:00
Jörn Friedrich Dreyer eca536d8b4 minor code cleanup 2014-06-18 12:53:20 +02:00
Jörn Friedrich Dreyer c020e8e658 use exceptions to notify abstract parent class of problems 2014-06-18 12:53:20 +02:00
Jörn Friedrich Dreyer 60a8419a1f when root storage cannot be mounted throw an exception visible to the end user 2014-06-18 12:53:20 +02:00
Jörn Friedrich Dreyer 1374ba9adf fix fallback config for default home storage 2014-06-18 12:53:20 +02:00
Jörn Friedrich Dreyer ccb698a6a8 move swift and abstract code to core 2014-06-18 12:53:20 +02:00
Jörn Friedrich Dreyer 3c66a8c8ed allow configuring objectstore as home and root storage 2014-06-18 12:53:19 +02:00
Robin Appelman b188550c22 Also support removeable mounts with rmdir 2014-06-16 16:24:42 +02:00
Robin Appelman 0532f5c39a Fix permission for movable storage root 2014-06-16 16:20:40 +02:00
Robin Appelman 87e311b996 Fix storage being passed to cache/watcher and scanner when using storage wrappers 2014-06-14 10:14:08 +02:00
Robin Appelman 65f3b2fad2 Add server<->server sharing backend 2014-06-14 10:10:37 +02:00
Vincent Petry b595c982d0 Merge pull request #8968 from owncloud/scanner-parent-repair
Repair broken parent link in the scanner
2014-06-12 17:40:44 +02:00
Vincent Petry 75a53b3c49 Merge pull request #8901 from owncloud/permissions-update-cache
Save the permissions in the filecache if it's not saved yet
2014-06-11 18:28:55 +02:00
Robin Appelman 6b1d8a56bb remove unused argument 2014-06-10 15:42:37 +02:00
Robin Appelman 054083b9cd add some comments 2014-06-10 15:37:43 +02:00
Robin Appelman 21cfd1014a Repair broken parent link in the scanner 2014-06-10 15:26:18 +02:00
Bjoern Schiessle 9dc0befcca call self::getNumericStorageId() to get the numeric ID 2014-06-10 14:48:19 +02:00
Robin Appelman 41d2354191 Save the permissions in the filecache if it's not saved yet 2014-06-09 12:34:35 +02:00
Thomas Müller c053f27381 Merge pull request #8921 from owncloud/fix-remove-storage-master
No need to create a storage within remove
2014-06-06 16:16:44 +02:00
icewind1991 c47d4ebbac Merge pull request #8666 from owncloud/mount-remove
Support for (re)moving mountpoints
2014-06-06 11:57:43 +02:00
Thomas Müller 26993f2167 No need to create a storage within remove 2014-06-06 11:39:35 +02:00
Thomas Müller ff651a3e0d Merge pull request #8909 from owncloud/fix-temporary-storage-rmdirr-master
use system function to recursive remove the directory used by temporary ...
2014-06-06 10:02:23 +02:00
Robin Appelman e362373a30 Movable storage root can always be moved and deleted 2014-06-06 09:56:01 +02:00
Robin Appelman a432459685 use triple equals 2014-06-06 09:56:01 +02:00
Robin Appelman 42a362f249 Fix phpdoc and comments 2014-06-06 09:56:01 +02:00
Bjoern Schiessle 329bfd81c3 remove encryption keys if user unshares a file 2014-06-06 09:55:59 +02:00
Robin Appelman dea5219244 Fix folder name for storage root 2014-06-06 09:55:59 +02:00
Robin Appelman 4fbc991ea2 Add the removing logic for mounts 2014-06-06 09:55:59 +02:00
Robin Appelman 8abe1c3f1a Don't do rename hooks for cache when moving the mountpoint 2014-06-06 09:55:58 +02:00
Robin Appelman 60a659c87e Add a system for (re)movable mount points 2014-06-06 09:55:58 +02:00
Thomas Müller d359765bdc Update PHPDoc 2014-06-06 09:44:34 +02:00
Thomas Müller ad4ec414c9 use system function to recursive remove the directory used by temporary storage 2014-06-06 09:29:31 +02:00
Robin Appelman 00539cf8f9 Verify that we have a valid storage in View->getPath 2014-06-05 15:50:19 +02:00
Thomas Müller e1beb8c6c3 Merge pull request #8889 from owncloud/mtime-reuse
Don't update the mtime if the storage mtime hasn't changed
2014-06-05 13:18:18 +02:00
Vincent Petry bbdcbb9911 Merge pull request #8866 from owncloud/flock-quotafix
Fixed quota wrapper to return the value from flock()
2014-06-05 13:11:45 +02:00
icewind1991 bd373d9621 Merge pull request #7878 from owncloud/quota-extstorageswitch
Added switch to count external storage data in quota
2014-06-05 11:23:32 +02:00
Jörn Friedrich Dreyer f1bf06f8cf Merge pull request #8884 from owncloud/move-flock-to-app
remove file locking - code will continue to live in it's own app
2014-06-05 10:54:24 +02:00
Robin Appelman 3e73251750 Don't update the mtime if the storage mtime hasn't changed 2014-06-05 10:08:25 +02:00
Thomas Müller ff3ded6cb2 Merge pull request #8852 from owncloud/kill-permissions-master
Kill permissions table
2014-06-05 10:05:05 +02:00
Thomas Müller da3974bcb2 - drop permissions table and related code
- the file/folder's permission is now stored in the file cache
- BackGroundWatcher has been removed - this has meanwhile be replaced by occ files:scan which can be executed in a cron jobs
- increase version to trigger database migration
2014-06-05 08:22:01 +02:00
Thomas Müller ec7225da66 remove file locking - code will continue to live in it's own app 2014-06-04 20:11:54 +02:00
Thomas Müller a2db53b928 Merge pull request #8471 from owncloud/versioning_no_longer_track_the_size
[versioning] let the file cache track the size of the versions
2014-06-04 18:19:48 +02:00
Vincent Petry da889ff029 Added experimental switch to count external storage data in quota
This includes all mountpoints except the Shared one in
the used space calculation.

Added unit tests for ext storage inclusion in quota calculation
2014-06-04 16:08:59 +02:00
Vincent Petry b5f0a17918 Merge pull request #8822 from owncloud/cache-change-propagator
[WIP] Improved propagation of cache changes
2014-06-04 13:03:14 +02:00
Vincent Petry 3507964820 Fixed quota wrapper to return the value from flock() 2014-06-04 12:36:53 +02:00
Bjoern Schiessle 48eb0515e9 only lock if unlink is called for a file 2014-06-04 07:55:46 +02:00
Bjoern Schiessle ab6680e9ab name the storage wrapper to make sure that we don't apply the wrapper multiple times 2014-06-04 07:55:46 +02:00
ringmaster ba887d2b17 Restore the reference to this used exception class. 2014-06-04 07:55:45 +02:00
ringmaster 54865815f5 Move Lock to private namespace, add interface. Update PHPDoc. 2014-06-04 07:55:45 +02:00
ringmaster 392a1b6662 Removed unused vars/declarations, update PHPDoc. 2014-06-04 07:55:45 +02:00
ringmaster 896bc526e6 Remove unused methods. 2014-06-04 07:55:44 +02:00
ringmaster f9dbdb7c5c Add actual locking and log changes necessary for debugging. 2014-06-04 07:55:44 +02:00
ringmaster dc1e3620d2 Continued flock work. 2014-06-04 07:55:44 +02:00
ringmaster 5365ae416e flock changes. Work in progress. 2014-06-04 07:55:44 +02:00
Robin Appelman a6bb1e1bf8 Fix size calculation during recursive scan 2014-06-03 19:54:59 +02:00
Robin Appelman 6689d67a5b Fix recursive scanning 2014-06-02 21:04:36 +02:00
Bjoern Schiessle e0a5f3b570 get permissions directly from share storage to avoid additional db calls 2014-06-02 20:17:40 +02:00
Bjoern Schiessle 7ad0fee0b5 let file cache handle the versions size 2014-06-02 18:55:13 +02:00
Robin Appelman e002ff6065 propagate changes in the scanner 2014-06-02 15:24:08 +02:00
Robin Appelman 0158788a2a Split of cache writes in the scanner to their own methods 2014-06-02 14:52:21 +02:00
Robin Appelman a31f089266 Add a change propagator class to handle propagating etag and mtime changes 2014-06-02 14:39:12 +02:00
Owen Winkler da6aae28ad Merge pull request #8607 from owncloud/filescan_app_hook
Allow apps to control via a hook skipping add/remove a file during filescan
2014-05-30 12:38:37 -04:00
ringmaster 19f0c47842 Missed one. 2014-05-30 10:40:26 -04:00
Thomas Müller 31ad1cbdd8 Merge pull request #5365 from owncloud/filesize-improvements-32bit
Add LargeFileHelper / Add CURL filesize workaround / Fix some 32-bit filesize issues
2014-05-30 16:13:48 +02:00
ringmaster 16ae63bdfd Updates per comments on PR:
* Use "filesystem_cache_readonly" config setting, update comment in config.sample
* Use $this->cacheActive to cache config setting
* Add public Scanner::setCacheActive() to set $cacheActive programmatically
2014-05-30 09:42:41 -04:00
Andreas Fischer 0417e52134 Increase file size limit from 2 GiB to 4 GiB when workarounds are unavailable. 2014-05-29 16:26:02 +02:00
Andreas Fischer 0bae68017e Cast to number instead of integer in OC\Files\Cache\HomeCache 2014-05-29 16:26:02 +02:00
Andreas Fischer a34aa1959a Cast to number instead of integer in OC\Files\Cache\Cache 2014-05-29 16:26:01 +02:00
Andreas Fischer fb7ec2bb22 Only call $this->filesize() for files. 2014-05-29 16:26:01 +02:00
Andreas Fischer c8fa1fd687 Refactor Large File handling code. 2014-05-29 16:26:01 +02:00
Andreas Fischer 3f8f8027d2 Cast to numeric instead of float, i.e. use an integer if possible. 2014-05-29 16:17:13 +02:00
Andreas Fischer 6195f13bda Use CURL to get filesize on 32bit systems. 2014-05-29 16:17:13 +02:00
Robin Appelman 998fa2d9be Pass any methods custom to specific storage implementations to the wrapped storage 2014-05-29 16:13:05 +02:00
Robin Appelman 0ae7a49c8e Fix storage wrapper being called with null 2014-05-29 14:15:48 +02:00
Robin Appelman 8c5521fdfc Add $storage->instanceOfStorage to handle instanceof for storage wrappers 2014-05-29 13:45:50 +02:00
icewind1991 c0f02be50a Merge pull request #3908 from owncloud/storage-folder-copy-rename
Recursive copy and remove for local storage backends
2014-05-29 13:29:24 +02:00
Thomas Müller 3ef9570d02 Merge pull request #8547 from owncloud/path-length-master
Handling long paths properly in \OC\Files\View
2014-05-29 00:08:29 +02:00
ringmaster f79948f519 Prevent apps from affecting the scanner via hook. 2014-05-28 13:20:20 -04:00
Robin Appelman 467e9c2bb0 Remove code duplication 2014-05-28 18:16:24 +02:00
Robin Appelman af35b6ad9d Fix LocalStorage->unlink to work on folder as expected 2014-05-28 18:16:24 +02:00
Robin Appelman 8187164fe1 re-use rescursive copy from common storage 2014-05-28 18:16:24 +02:00
Robin Appelman 488fc402e4 remove unneeded check 2014-05-28 18:16:23 +02:00
Robin Appelman d15ed9b4d3 use \OC\Files\Filesystem::isIgnoredDir 2014-05-28 18:16:23 +02:00
Robin Appelman ea44f0e20f fix recursive copy and rename for common storage backend 2014-05-28 18:16:23 +02:00
Robin Appelman c3c9612c99 fix recursive copy and rename for mapped local storage backend 2014-05-28 18:16:23 +02:00
Robin Appelman 03ba497a8c add recursive copy to local storage backend 2014-05-28 18:16:23 +02:00
Robin Appelman 38c1da0976 fix recursive rename for local storage backend 2014-05-28 18:16:23 +02:00
Robin Appelman e83b41493f remove unneeded delTree 2014-05-28 18:16:23 +02:00
Thomas Müller a2e4bc8d33 # This is a combination of 2 commits.
# The first commit's message is:

adding tests for long paths
increment path field in database up to 4000 (maximum for Oracle - otherwise we could use php's 4096)
increment version to trigger database migration
adding unit test for too long path

# This is the 2nd commit message:

fix too long path
2014-05-28 15:30:44 +02:00
ringmaster 3d1ba574e4 Change visibility of scanner internals
so that descendant classes can access them.
2014-05-28 07:59:38 -04:00
ringmaster 26d169b27c Use 'filesystem_check_enable' as a config option. 2014-05-27 16:01:16 -04:00
ringmaster 3b287f8274 Allow the default behavior to come from the config. 2014-05-27 15:21:35 -04:00
ringmaster fdf26c5a3f Rename variable to something more appropriate. 2014-05-27 15:12:56 -04:00
ringmaster 645e7035a4 Allow apps to control via a hook to skip adding/removing a file during filescan 2014-05-27 15:12:54 -04:00
Frank Karlitschek 48d0cebc42 Merge pull request #8674 from owncloud/watch-policy
Add a config option for setting the filesystem watcher policy
2014-05-26 10:48:44 +02:00
Robin Appelman 151c48494e Add a config option fro setting the filesystem watcher policy 2014-05-23 12:20:31 +02:00
Robin Appelman ff1f341d97 Fix phpdoc 2014-05-22 13:30:32 +02:00
Bjoern Schiessle 12338e0ef0 allow admin to disable sharing for specific groups of users 2014-05-22 10:43:44 +02:00
Bjoern Schiessle 5f403f3e92 move the mount point up if a share is mounted to a subfolder and the subfolder no longer exists 2014-05-21 13:19:17 +02:00
Morris Jobke dc36d30953 Remove all occurences of @brief and @returns from PHPDoc
* test case added to avoid adding them later
2014-05-19 17:50:53 +02:00
Thomas Müller 95741f3936 Merge pull request #8435 from owncloud/fix-8322-master
Expose permission via WebDAV
2014-05-19 16:52:03 +02:00
Robin McCorkell 4755392c65 More PHPDoc for file functions 2014-05-13 19:09:14 +01:00
Robin McCorkell bac8962bbc Fix Scrutinizer errors 2014-05-13 19:08:14 +01:00
Robin McCorkell 87b548ed91 Fix all PHPDoc types and variable names, in /lib 2014-05-13 19:08:14 +01:00
Robin McCorkell a7ae2e874a Squash 'a | b' into 'a|b', in /lib 2014-05-13 19:08:14 +01:00
Robin McCorkell b5bc37d2e4 Fix @return array PHPDocs, in /lib 2014-05-13 19:08:14 +01:00
Vincent Petry bab8c1f8e5 Fixed getAbsolutePath case when path is "0"
Make sure to correctly check for string emptiness when the passed path
is "0".
2014-05-13 17:38:46 +02:00
Thomas Müller e0dd69e4e6 remove legacy aka deprecated code: OC_FilesystemView 2014-05-12 16:30:39 +02:00
Vincent Petry 05dc694c5c Fix getPathById for Oracle
Added extra code to handle the case of Oracle which saves empty strings
as null values.
2014-05-08 13:33:55 +02:00
Vincent Petry 9e18be6422 Merge pull request #8377 from youngguns-nl/issue_8376
RecursiveDirectoryIterator does not work on NFS
2014-05-02 18:45:09 +02:00
Thomas Müller c92c577b5e - Introduce isShared() and isMounted() on FileInfo class
- Reuse these methods on determineIcon()
- Generate permission string for the desktop client
- expose {http://owncloud.org/ns}permissions as additional WebDAV property containing the permission string
2014-05-02 17:37:16 +02:00
Joas Schilling c060f6ec7b Deduplicate code 2014-04-29 10:34:28 +02:00
Joas Schilling c1caaa6241 Correctly emit create/update hooks when a large file is being created/update
after being uploaded in .part files

Fix #8131
2014-04-29 10:34:27 +02:00
Joas Schilling 4fa9e46d2b Emit a new hook, when a file is being updated only
The write-hook also is triggered for created files

Fix #8131
2014-04-29 10:34:26 +02:00
Sjors van der Pluijm e8a287f5bb refs #8376; spaces=>tabs 2014-04-28 19:52:06 +02:00
Sjors van der Pluijm 54f482ff9c refs #8376; added comment and applied patch on other files 2014-04-28 19:32:25 +02:00
Sjors van der Pluijm d7ec1fe447 rewind iterator before iteration starts 2014-04-28 13:05:20 +02:00
Sjors van der Pluijm d8be9d96ed fixes #8376 2014-04-28 10:20:24 +02:00
icewind1991 7599fa94ce Merge pull request #8350 from owncloud/share-search-mime
fix search by mime for shared single files
2014-04-25 15:54:36 +02:00
icewind1991 5194f014c9 Merge pull request #7504 from owncloud/webdav-injection
Proper injection of filesystem view into the webdav connector
2014-04-25 14:42:43 +02:00
Robin Appelman 194ea66cb5 Merge branch 'master' into share-search-mime 2014-04-25 14:04:41 +02:00
Robin Appelman 672a8248ce Correct the path returned by getFolderContent for substorages 2014-04-25 13:56:45 +02:00
Robin Appelman 456ca0cf7d fix paths of searchByMime results on substorages 2014-04-25 12:31:44 +02:00
Robin Appelman 6c20a014ea merge master into webdav-injection 2014-04-25 11:47:06 +02:00
Björn Schießle f520305848 Merge pull request #8026 from owncloud/remove_shared_folder
remove the "Shared" folder
2014-04-24 18:45:45 +02:00
Bjoern Schiessle 93469ca468 make it possible to move files out of a shared mount point 2014-04-23 12:54:26 +02:00
Bjoern Schiessle 652d417a58 we don't allow to share a folder if it contains a share mount point 2014-04-23 12:54:26 +02:00
Bjoern Schiessle dfb69e9418 allow user to delete shared files/folders 2014-04-23 12:54:25 +02:00
Bjoern Schiessle a02fb3722b user should be able to rename/delete shared files if the owner allowed it 2014-04-23 12:54:24 +02:00
Bjoern Schiessle 72bbb9ca20 allow to remove and change mount points 2014-04-23 12:54:24 +02:00
Robin Appelman 3d0661a1e7 Fix error when viewing expired link 2014-04-23 12:54:18 +02:00
Robin Appelman b42ce6c30a Prevent error if previously cached data doesn't have an etag 2014-04-22 15:24:38 +02:00
Morris Jobke a2a0eb370b Merge pull request #8222 from owncloud/type-hinting
Type hinting fixes
2014-04-17 16:08:15 +02:00
Robin McCorkell 13b463cc17 Merge pull request #8189 from Xenopathic/misc_fixes
Various fixes
2014-04-17 11:56:51 +01:00
Bart Visscher a4b7f5155f Fix PHPdoc in lib/private
using scrutinizer patch
2014-04-15 22:55:20 +02:00
Thomas Müller 8bc7174bdc Merge pull request #8104 from owncloud/lukepolo-master
Added the ability to Drag and Drop folders [chrome]
2014-04-15 21:39:32 +02:00
Thomas Tanghus 51e47319ef White-list known secure mime types. Refs. #8184 2014-04-14 17:17:50 +02:00
Robin McCorkell eeee9eacea Prevent error from cache update on deleted files 2014-04-13 16:17:13 +01:00
Vincent Petry 8d05848391 Merge pull request #7825 from owncloud/hash-stream
Use streams when generating hashes of remote files
2014-04-10 10:42:04 +02:00