Skip to content
Snippets Groups Projects
Commit d84d5486 authored by Thomas Müller's avatar Thomas Müller
Browse files

when storing back the data field 'encrypted' it is necessary to cast the...

when storing back the data field 'encrypted' it is necessary to cast the boolean to an integer to make pg happy
parent c8f9efeb
Branches
No related tags found
No related merge requests found
...@@ -121,6 +121,8 @@ class Scanner extends BasicEmitter { ...@@ -121,6 +121,8 @@ class Scanner extends BasicEmitter {
} }
$parentCacheData = $this->cache->get($parent); $parentCacheData = $this->cache->get($parent);
$parentCacheData['etag'] = $this->storage->getETag($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); $this->cache->put($parent, $parentCacheData);
} }
} }
......
...@@ -195,6 +195,7 @@ class Scanner extends \PHPUnit_Framework_TestCase { ...@@ -195,6 +195,7 @@ class Scanner extends \PHPUnit_Framework_TestCase {
$data1 = $this->cache->get('folder'); $data1 = $this->cache->get('folder');
$data2 = $this->cache->get(''); $data2 = $this->cache->get('');
$data0['etag'] = ''; $data0['etag'] = '';
$data0['encrypted'] = $data0['encrypted'] ? 1: 0;
$this->cache->put('folder/bar.txt', $data0); $this->cache->put('folder/bar.txt', $data0);
// rescan // rescan
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment