Commit graph

513 commits

Author SHA1 Message Date
Robin Appelman
ddee63fa00 Fix resolving paths for views rooted in a file 2015-01-29 12:47:11 +01:00
Robin Appelman
8c9f1a982c Update the cache when renaming even if we dont emit hooks 2015-01-28 13:44:39 +01:00
Morris Jobke
752b94d363 Merge pull request #13717 from owncloud/storage-donotwrapnullstorage
Prevent wrapping null storage
2015-01-28 01:00:20 +01:00
Morris Jobke
87b39e8f03 Merge pull request #13525 from owncloud/s2s-fixscanfileforbrokenstorage
Catch storage exception in scanner for remote shares
2015-01-28 00:31:37 +01:00
Vincent Petry
6d8985b671 Prevent wrapping null storage
Can happen when trying to instantiate external storages that have
incomplete config, where the constructor throws an exception (the
exception is caught in createStorage())
2015-01-27 17:40:08 +01:00
Vincent Petry
acec40fe5a Merge pull request #13561 from owncloud/trash-finaldeletewhencrossstoragefix
Call final unlink in trash wrapper's storage
2015-01-27 17:05:38 +01:00
Bernhard Posselt
b8769802df fix node interface 2015-01-26 15:58:41 +01:00
Vincent Petry
87ce64c24e Replace OC_Log::ERROR with OCP\Util::ERROR 2015-01-26 15:51:31 +01:00
Vincent Petry
f6e644b43f Catch storage exception in scanner for remote shares
Whenever an exception occurs during scan of a remote share, the share is
checked for availability. If the storage is gone, it will be removed
automatically.

Also, getDirectoryContent() will now skip unavailable storages.
2015-01-26 13:59:49 +01:00
Robin Appelman
87a1b2bdc4 Preserve mtime when doing cross storage move 2015-01-23 15:11:27 +01:00
Robin Appelman
960ff4f136 Apply wrappers to existing mounts before registering it 2015-01-23 13:48:35 +01:00
Vincent Petry
5fb8a4715d removeStorageWrapper to unregister a storage wrapper 2015-01-23 12:20:54 +01:00
Vincent Petry
6fb553e92c Do not call wrapStorage if storate with same name added twice 2015-01-22 16:24:24 +01:00
Thomas Müller
65041440de check is mimetype is set - fixed #13452 2015-01-19 15:04:53 +01:00
Robin Appelman
2248e465af Remove children from the cache in one query 2015-01-15 17:26:12 +01:00
Thomas Müller
337c43ce92 Merge pull request #13317 from owncloud/partfile-fileinfo
Return valid fileinfo objects for part files
2015-01-14 22:39:19 +01:00
Morris Jobke
c8fa85451c Merge pull request #13320 from owncloud/fix-php-doc-for-files-view
Fix annotations in file view
2015-01-13 18:05:00 +01:00
Morris Jobke
0a400b4577 drop unused parameter 2015-01-13 18:04:20 +01:00
Lukas Reschke
d66facc762 Fix annotations in file view 2015-01-13 14:53:00 +01:00
Robin Appelman
96dff341e2 Return valid fileinfo objects for part files 2015-01-13 13:59:28 +01:00
Morris Jobke
7746ac519f drop dead code - ref #13301 2015-01-13 13:52:25 +01:00
Thomas Müller
543fa0d45b Merge pull request #13291 from owncloud/node-searchcommonbasepathfix
Fix searchCommon to properly match path name
2015-01-13 13:25:51 +01:00
Vincent Petry
a2a7a60293 Merge pull request #13301 from owncloud/drop-etag-message
drop useless "!!! No reuse of etag" - fixes #13187
2015-01-13 12:24:24 +01:00
Lukas Reschke
f0ac8a278a Use json_encode on string
It's better to encode the string to prevent possible (yet unknown) bugs in combination with PHP's type juggling.

Previously the boolean statements evaluated to either an empty string (false) or a not empty one (true, then it was 1). Not it always evaluates to false or true.

This also removes a stray - that was not intended there but shouldn't have produced any bugs. Just to increase readability.

Thanks @nickvergessen for spotting.

Addresses https://github.com/owncloud/core/pull/13235/files#r22852319
2015-01-13 11:08:18 +01:00
Morris Jobke
9b49b52fc6 drop useless "!!! No reuse of etag" - fixes #13187 2015-01-13 09:54:48 +01:00
Vincent Petry
fcc3b3d5f7 Fix searchCommon to properly match path name
The internal path was matched without the last "/" which caused
"files_trashbin" to also match when the internal path was "files".

This adds the missing slash for the comparison.
2015-01-12 19:33:00 +01:00
Morris Jobke
c91d47e5b3 Merge pull request #13224 from owncloud/simplify-is-valid-path-and-add-unit-tests
Simplify isValidPath and add unit tests
2015-01-10 17:35:40 +01:00
Morris Jobke
8057bc6646 Merge pull request #13236 from owncloud/use-isset-for-performance
Use isset() instead of strlen()
2015-01-10 16:32:50 +01:00
Lukas Reschke
310424db5d Use isset() instead of strlen()
Isset is a native language construct and thus A LOT faster than using strlen()

On my local machine this leads to a 1s performance gain for about 1 million paths. Considering that this function will be called a lot for every file operation this makes a noticable difference.
2015-01-10 12:06:51 +01:00
Lukas Reschke
7e11ca06f6 Cache results of normalizePath
`normalizePath` is a rather expensive operation and called multiple times for a single path for every file related operation.

In my development installation with about 9GB of data and 60k files this leads to a performance boost of 24% - in seconds that are 1.86s (!) - for simple searches. With more files the impact will be even more noticeable. Obviously this affects every operation that has in any regard something to do with using OC\Files\Filesystem.

Part of https://github.com/owncloud/core/issues/13221
2015-01-10 11:10:38 +01:00
Lukas Reschke
05615bfd47 Simplify isValidPath and add unit tests
The check for invalid paths is actually over-complicated and performed twice resulting in a performance penalty. Additionally, I decided to add unit-tests to that function.

Part of https://github.com/owncloud/core/issues/13221
2015-01-10 00:40:21 +01:00
Robin McCorkell
631d6571fd Merge pull request #13181 from owncloud/filecache-preventleadingslash
Trim leading or trailing slashes in file cache paths
2015-01-09 13:54:17 +00:00
Morris Jobke
800738f51a Merge pull request #12011 from owncloud/reuse-etag-default
Default to reusing etags in the scanner
2015-01-09 14:38:45 +01:00
Vincent Petry
888ce4d4f9 Fix cache jail to not duplicate slashes 2015-01-09 10:18:32 +01:00
Vincent Petry
aa821ecc00 Trim leading or trailing slashes in file cache paths 2015-01-08 19:43:02 +01:00
Morris Jobke
fd57820708 Merge pull request #13132 from aptivate/improve_debug_logging_messages
Improve debugging for ServiceUnavailable exceptions
2015-01-07 10:36:27 +01:00
Chris Wilson
402a3ed146 Improve debugging for ServiceUnavailable exceptions
I was getting a lot of these in my logs for no apparent reason, and file
uploads were failing:

	{"app":"webdav","message":"Sabre\\DAV\\Exception\\ServiceUnavailable: ","level":4,"time":"2015-01-06T15:33:39+00:00"}

In order to debug it, I had to add unique messages to all the places where
this exception was thrown, to identify which one it was, and that made the
logs much more useful:

	{"app":"webdav","message":"Sabre\\DAV\\Exception\\ServiceUnavailable: Encryption is disabled","level":4,"time":"2015-01-06T15:36:47+00:00"}
2015-01-06 15:59:38 +00:00
Jörn Friedrich Dreyer
c738359a11 add paged provider 2015-01-02 10:28:41 +01:00
Thomas Müller
81243b0f5d adding getDirectDownload() to Wrapper 2014-12-28 17:17:14 +01:00
Thomas Müller
5b00bc1d6e Adding basement for the direct download url 2014-12-28 17:17:14 +01:00
Bernhard Posselt
8e37214346 add an interface for the root folder so apps have an interface to deal with storage
fix comments and newline

add newline
2014-12-21 20:52:34 +01:00
Morris Jobke
75e8b39826 Merge pull request #12879 from owncloud/mountconfig
Add mount specific options
2014-12-18 23:38:14 +01:00
Robin Appelman
9ddd5033d4 Movable mountpoints are always deletable 2014-12-17 16:09:28 +01:00
Robin Appelman
fd85424742 Add getMountPoint to FileInfo 2014-12-17 14:03:50 +01:00
Robin Appelman
95a145f67f Load mount specific options from the mount config 2014-12-17 14:03:50 +01:00
Vincent Petry
c6be491a89 Return file info from Node API 2014-12-15 12:10:54 +01:00
Morris Jobke
5b3971f002 Merge pull request #12639 from owncloud/bad_mtime_format
Fix formatting of bad dates from external storages
2014-12-13 10:07:10 +01:00
Robin McCorkell
fdbb68a3c3 Return ? if mtime is 0 or -1
Tooltip contains 'Unable to determine date'. Fixes #6395
2014-12-12 23:54:18 +00:00
Vincent Petry
4b57892c4e Merge pull request #12778 from owncloud/searchbytags2
Added searchByTags to view, storage and cache
2014-12-12 14:27:19 +01:00
Vincent Petry
b1bef5cc15 Merge pull request #12587 from owncloud/dav-logerrors
Log exceptions in DAV storage
2014-12-12 11:58:04 +01:00