]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge remote-tracking branch 'owncloud/master' into fixing-4866-master
authorAndreas Fischer <bantu@owncloud.com>
Mon, 23 Sep 2013 10:44:11 +0000 (12:44 +0200)
committerAndreas Fischer <bantu@owncloud.com>
Mon, 23 Sep 2013 10:44:11 +0000 (12:44 +0200)
* 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

1  2 
lib/files/cache/scanner.php
tests/lib/files/cache/scanner.php

Simple merge
index b137799bbcfc078f447962356cb49da95170d439,4c90119814ab4af467cec149d00c6cd4cea29559..6956e7aa9488c84c3086ce346b5448a322b80958
@@@ -184,32 -184,16 +184,41 @@@ class Scanner extends \PHPUnit_Framewor
                $this->assertFalse($this->cache->inCache('folder/bar.txt'));
        }
  
+       public function testScanRemovedFile(){
+               $this->fillTestFolders();
+               $this->scanner->scan('');
+               $this->assertTrue($this->cache->inCache('folder/bar.txt'));
+               $this->storage->unlink('folder/bar.txt');
+               $this->scanner->scanFile('folder/bar.txt');
+               $this->assertFalse($this->cache->inCache('folder/bar.txt'));
+       }
 +      public function testETagRecreation() {
 +              $this->fillTestFolders();
 +
 +              $this->scanner->scan('folder/bar.txt');
 +
 +              // manipulate etag to simulate an empty etag
 +              $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_ETAG);
 +              $data0 = $this->cache->get('folder/bar.txt');
 +              $data1 = $this->cache->get('folder');
 +              $data2 = $this->cache->get('');
 +              $data0['etag'] = '';
 +              $this->cache->put('folder/bar.txt', $data0);
 +
 +              // rescan
 +              $this->scanner->scan('folder/bar.txt', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_ETAG);
 +
 +              // verify cache content
 +              $newData0 = $this->cache->get('folder/bar.txt');
 +              $newData1 = $this->cache->get('folder');
 +              $newData2 = $this->cache->get('');
 +              $this->assertNotEmpty($newData0['etag']);
 +              $this->assertNotEquals($data1['etag'], $newData1['etag']);
 +              $this->assertNotEquals($data2['etag'], $newData2['etag']);
 +      }
 +
        function setUp() {
                $this->storage = new \OC\Files\Storage\Temporary(array());
                $this->scanner = new \OC\Files\Cache\Scanner($this->storage);