]> source.dussan.org Git - nextcloud-server.git/commitdiff
when storing back the data field 'encrypted' it is necessary to cast the boolean...
authorThomas Müller <thomas.mueller@tmit.eu>
Fri, 20 Sep 2013 18:34:17 +0000 (20:34 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Fri, 20 Sep 2013 18:34:17 +0000 (20:34 +0200)
lib/files/cache/scanner.php
tests/lib/files/cache/scanner.php

index fdbce0d51fee454d2d7d841ac71a133c97c1bacb..d296c6068653c2c1bdecf43950539215bf68c5bd 100644 (file)
@@ -121,6 +121,8 @@ class Scanner extends BasicEmitter {
                                                                        }
                                                                        $parentCacheData = $this->cache->get($parent);
                                                                        $parentCacheData['etag'] = $this->storage->getETag($parent);
+                                                                       // the boolean to int conversion is necessary to make pg happy
+                                                                       $parentCacheData['encrypted'] = $parentCacheData['encrypted'] ? 1 : 0;
                                                                        $this->cache->put($parent, $parentCacheData);
                                                                }
                                                        }
index b137799bbcfc078f447962356cb49da95170d439..8112eada17cc651e37e4153d8fc0f0a825cf3a88 100644 (file)
@@ -195,6 +195,7 @@ class Scanner extends \PHPUnit_Framework_TestCase {
                $data1 = $this->cache->get('folder');
                $data2 = $this->cache->get('');
                $data0['etag'] = '';
+               $data0['encrypted'] = $data0['encrypted'] ? 1: 0;
                $this->cache->put('folder/bar.txt', $data0);
 
                // rescan