Thomas Müller
ec45a3c0e2
Merge pull request #6962 from owncloud/quota-space-root
...
Allow passing a root folder to get the used space from in the quota wrapper
2014-02-20 16:47:59 +01:00
Vincent Petry
b2b35cd335
Fixed ext storage webdav path encoding
...
- Some WebDAV servers like lighttpd need paths in URLs to be properly
encoded
- Added error log output when curl connection failed
- Added check for 'resourcetype' in case the WebDAV server doesn't
support/return it
- Fixed touch() to return false if the server doesn't implement
PROPPATCH
- Added optional delay in WebDAV unit tests to use when testing against
lighttpd's WebDAV
2014-02-19 18:34:08 +01:00
Morris Jobke
bcad6e641a
Merge pull request #7274 from owncloud/scrutinizer-patch-1
...
Scrutinizer Auto-Fixes
2014-02-19 11:51:04 +01:00
Robin Appelman
eea1abae20
add unit tests for watcher policies
2014-02-19 09:52:51 +01:00
Scrutinizer Auto-Fixer
adaee6a5a1
Scrutinizer Auto-Fixes
...
This patch was automatically generated as part of the following inspection:
https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720
Enabled analysis tools:
- PHP Analyzer
- JSHint
- PHP Copy/Paste Detector
- PHP PDepend
2014-02-19 09:31:54 +01:00
Robin Appelman
2166683e3b
Allow setting the frequency of which the file watcher checks for updates
2014-02-18 16:34:25 +01:00
Robin Appelman
3afdcd85e7
Add unit test for quote wrapper size root
2014-02-04 16:05:12 +01:00
Vincent Petry
1af7dab535
Fixed quota wrapper to not wrap failed fopen streams
...
When calling fopen() on some storage types, these return false instead
of throwing an exception.
This fix makes sure that in case the stream wasn't opened (for example
when a file doesn't exist any more) the stream isn't wrapped.
Also added 'rb' as another case that doesn't need to be wrapped.
Fixes #6832
2014-01-19 18:51:36 +01:00
Vincent Petry
23e6578601
Fix array access syntax for older PHP
...
There was a syntax error when running tests in PHP 5.3.10.
2014-01-17 12:31:22 +01:00
Vincent Petry
34559ef114
Merge pull request #6768 from owncloud/scanner-use-storage-mtime
...
Use storage_mtime when determining if we can reuse cached data while scanning
2014-01-15 01:31:33 -08:00
Robin Appelman
16b898ddb8
update another test
2014-01-14 20:19:05 +01:00
Robin Appelman
7e4c80fd60
use different value for mtime and storage_mtime in test
2014-01-14 15:13:21 +01:00
Robin Appelman
4113042c8f
remove duplicate test class
2014-01-14 15:11:41 +01:00
Robin Appelman
203d5d01ca
Use storage_mtime when determining if we can reuse cached data while scanning
2014-01-14 13:54:07 +01:00
Vincent Petry
4faba49f0a
Fix calculated folder size to use unencrypted size
...
The encrypted size was used when calculating folder sizes.
This fix now also sums up the unencrypted size and shows that one when
available.
2014-01-09 17:47:50 +01:00
Vincent Petry
f642ad3961
Prevent deleting storage root
...
Storage mount points are not deletable, so make sure that the unlink
operation and its hooks aren't run in such cases.
Note that some storages might recursively delete their contents when
calling unlink on their root. This fix prevents that as well.
2014-01-08 13:17:36 +01:00
Vincent Petry
5be4af9f51
Now also preventing to override "files" dir size with -1
...
Fixes #6526
2014-01-07 22:34:01 +01:00
Robin Appelman
46b72cbff0
remove unneeded ; in comment
2013-12-12 15:14:44 +01:00
Robin Appelman
30e0b474f8
Add test for having utf8 filenames in the cache
2013-12-12 13:43:55 +01:00
Robin Appelman
e888bdda30
get rid of failing test that don't cause additional downloads
2013-12-06 18:26:38 +01:00
Robin Appelman
cf9b7e343a
extend test case for etag preservation
2013-12-06 13:00:58 +01:00
Robin Appelman
01ab15a2b0
reuse etags when doing a background scan
2013-12-05 15:23:34 +01:00
Vincent Petry
6cf9844e9c
Added unit test for the test() method
...
This is to make sure that method isn't broken
2013-12-03 14:35:53 +01:00
Vincent Petry
d69243ee51
Fixed FTP and SMB to use rmdir() when deleting folders
...
Some storages need to use different calls for deleting files or folders,
usually unlink() and rmdir().
Fixes #4532 (SMB dir deletion)
Fixes #5941 (FTP dir deletion)
Note that the extra is_dir() should be fast because it's read from the
stat cache.
2013-11-29 13:01:01 +01:00
Vincent Petry
43b1cf7988
Redetect mime type whenever extension is renamed
2013-11-27 21:34:51 +01:00
Vincent Petry
2653d914d9
Merge pull request #6008 from owncloud/extstorage-smb-webdav-renamefix
...
Fixed SMB rename function to overwrite target file
2013-11-26 06:42:36 -08:00
Vincent Petry
712b47757a
Updated unit tests for SMB
...
- coverage for touch return value
- fixed directory provider to exclude unsupported cases
2013-11-26 12:53:03 +01:00
Vincent Petry
c3e34676ba
Improved unit test for "overwrite on move"
...
Now using a different content to make sure the file was overwritten.
2013-11-25 18:54:58 +01:00
Vincent Petry
af7118aa5d
Added unit test for "overwrite file on rename/move"
...
Also fixed "rename" unit test that was ready the result out of the wrong
file.
2013-11-25 18:52:14 +01:00
Vincent Petry
5b6d1d79d0
Fixed SMB file deletion success detection
...
Since unlink() smb4php doesn't return true on deletion success, we need
to check whether the file was deleted to confirm success.
Fixes #5866
2013-11-19 15:05:11 +01:00
Morris Jobke
4a0d295e4a
Merge pull request #5927 from owncloud/quota-excludeextstorage
...
External storage space is now not counted in total space
2013-11-18 14:42:40 -08:00
Vincent Petry
3e2fd9942b
Root size for home storage is now size of "files" subdir
...
Fixes #4593
2013-11-18 18:17:25 +01:00
Vincent Petry
614e4d485c
External storage space is now not counted in total space
...
Added argument to getFileInfo() to disable adding the size of
mountpoints to a directory's size.
Fixes #5924
2013-11-18 18:09:01 +01:00
Vincent Petry
d9ab964ff9
Added missing test with leading backslash
2013-11-14 15:36:03 +01:00
Vincent Petry
c06d8bb007
Fixed normalizePath() to strip out single dot dirs
...
Now removing "/./" and trailing "/." from the paths when normalizing.
2013-11-14 13:15:03 +01:00
Vincent Petry
34c92f6656
Now using HomeStorage for legacy home storage ids
...
Legacy home storage ids with the format "local://path/to/datadir/user1"
are now also wrapped by the HomeStorage.
2013-11-12 18:01:02 +01:00
Robin Appelman
32a703ab36
Do not use -1 as the size for the root folder of the home storage
2013-11-12 16:15:43 +01:00
Vincent Petry
7ff6a642b4
Fixed filesize issue in watchr test
...
Added clearstatcache to make sure we get the correct file size after
re-writing into the same file.
This failed on openSUSE 12.3 x86_64
2013-11-05 17:01:02 +01:00
Thomas Müller
d25c8b43e6
Merge pull request #5652 from owncloud/front-port-5647-master
...
[WIP] extend unit test to directories starting or ending in whitespace
2013-11-01 23:11:33 -07:00
Jörn Friedrich Dreyer
10b2d649af
extend unit test to directories starting or ending in whitespace
2013-10-31 14:24:43 +01:00
Thomas Müller
261cd87efa
Merge branch 'master' into home-storage
2013-10-30 22:11:19 +01:00
Robin Appelman
c9f3f2874f
Merge branch 'master' into update-parent-storage-mtime
...
Conflicts:
lib/private/files/cache/updater.php
2013-10-30 13:41:10 +01:00
Bjoern Schiessle
fcfac51aa1
backport of https://github.com/owncloud/core/pull/5513
2013-10-29 15:08:12 +01:00
Robin Appelman
654b0daf01
update touch tests for updated behaviour
2013-10-29 14:22:13 +01:00
Robin Appelman
b3626f34cd
Update the parent folders storage_mtime on write and delete to prevent rescans
2013-10-29 14:18:57 +01:00
Robin Appelman
f1e6e80eb1
add specialized storage backend for home folders
2013-10-29 00:14:23 +01:00
Vincent Petry
c8df27de73
Fixed quota stream to not wrap read-only fopen calls
2013-10-25 12:33:16 +02:00
Vincent Petry
d8b245490b
Fixed quota stream's fseek method
...
- Added missing return statement
- Added missing support for SEEK_END
- Fixes #5524
2013-10-25 12:09:46 +02:00
VicDeo
26c0007a5f
Merge pull request #5263 from owncloud/fixing-5255-master
...
Proper behavior of resolvePath()
2013-10-10 09:27:45 -07:00
Thomas Müller
bc6e352ccd
the path need to be normalized before putting it into resolvePath()
...
otherwise the returned internalPath will not match followup calls to e.g. Cache::getID()
2013-10-10 16:06:26 +02:00