aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-09-20 20:34:17 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-09-20 20:34:17 +0200
commitd84d548618651c0a66bd2696d6547b33ca6b8e87 (patch)
treee79850bd161e5cf98c20e0673d3b9419fe7990e7
parentc8f9efeb94b136ed0906cefe946629a091796ff2 (diff)
downloadnextcloud-server-d84d548618651c0a66bd2696d6547b33ca6b8e87.tar.gz
nextcloud-server-d84d548618651c0a66bd2696d6547b33ca6b8e87.zip
when storing back the data field 'encrypted' it is necessary to cast the boolean to an integer to make pg happy
-rw-r--r--lib/files/cache/scanner.php2
-rw-r--r--tests/lib/files/cache/scanner.php1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php
index fdbce0d51fe..d296c606865 100644
--- a/lib/files/cache/scanner.php
+++ b/lib/files/cache/scanner.php
@@ -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);
}
}
diff --git a/tests/lib/files/cache/scanner.php b/tests/lib/files/cache/scanner.php
index b137799bbcf..8112eada17c 100644
--- a/tests/lib/files/cache/scanner.php
+++ b/tests/lib/files/cache/scanner.php
@@ -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