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
Robin Appelman
1378af838c
merge master into hooks-view-same-start
2013-10-10 11:34:30 +02:00
Robin Appelman
7f8eeb0474
ensure the view's root is a subfolder of the the default root, not only starting the same
2013-10-09 20:46:43 +02:00
Robin Appelman
38c563dcdc
don't trigger the create hooks when if the file already exists for file_put_contents
2013-10-09 20:34:18 +02:00
Robin Appelman
235517f111
clear permissions cache when scanning a file
2013-09-24 00:57:58 +02:00
Andreas Fischer
d9a36ee82e
Move setUp() and tearDown() up in tests/lib/files/cache/scanner.php.
2013-09-23 12:45:02 +02:00
Andreas Fischer
4a9f1cc74d
Merge remote-tracking branch 'owncloud/master' into fixing-4866-master
...
* owncloud/master: (98 commits)
[tx-robot] updated from transifex
files: when filtering search results, ensure results are children of the fakeroot not just path starting the same
setting a default on filecache column unencrypted_size
[tx-robot] updated from transifex
remove unneccessary lib in namespace
namespaces use upcasefirst parts when _ is left in namespace and files are named after their classes the autoloader will also find classes in the lib folder of an app its magic!
initialize variable
calculate correct permissions while toggle the password protection
make sure that both $permissions and $oldPermissions have the same type
Add copyright, remove starting blank line
update inherit docs comment
Fix insert/update/delete helper functions for oracle
Add missing return true statements to legacy preferences functions
Add missing static
Convert OC_Preference to object interface
fix race condition in lazy preview loading
use {count} instead of 'One' for more versatile translation
fix double translation of error message
use n to translate title
fixing typos and l10n
...
Conflicts:
tests/lib/files/cache/scanner.php
2013-09-23 12:44:11 +02:00
Thomas Müller
03eedb58fc
Merge pull request #4327 from owncloud/scanfile-remove
...
remove deleted files while scanning
2013-09-22 22:40:13 -07:00