don't change the etags if a file gets encrypted/decrypted to avoid that the sync client downloads all files again
This commit is contained in:
parent
cabe92ef12
commit
1be11bb03d
1 changed files with 32 additions and 24 deletions
|
@ -708,6 +708,9 @@ class Util {
|
|||
// Encrypt unencrypted files
|
||||
foreach ($found['encrypted'] as $encryptedFile) {
|
||||
|
||||
//get file info
|
||||
$fileInfo = \OC\Files\Filesystem::getFileInfo($encryptedFile['path']);
|
||||
|
||||
//relative to data/<user>/file
|
||||
$relPath = Helper::stripUserFilesPath($encryptedFile['path']);
|
||||
|
||||
|
@ -765,7 +768,8 @@ class Util {
|
|||
\OC\Files\Filesystem::putFileInfo($relPath, array(
|
||||
'encrypted' => false,
|
||||
'size' => $size,
|
||||
'unencrypted_size' => $size
|
||||
'unencrypted_size' => $size,
|
||||
'etag' => $fileInfo['etag']
|
||||
));
|
||||
|
||||
$decryptedFiles[] = $relPath;
|
||||
|
@ -816,6 +820,9 @@ class Util {
|
|||
// Encrypt unencrypted files
|
||||
foreach ($found['plain'] as $plainFile) {
|
||||
|
||||
//get file info
|
||||
$fileInfo = \OC\Files\Filesystem::getFileInfo($plainFile['path']);
|
||||
|
||||
//relative to data/<user>/file
|
||||
$relPath = $plainFile['path'];
|
||||
|
||||
|
@ -851,7 +858,8 @@ class Util {
|
|||
\OC\Files\Filesystem::putFileInfo($relPath, array(
|
||||
'encrypted' => true,
|
||||
'size' => $size,
|
||||
'unencrypted_size' => $size
|
||||
'unencrypted_size' => $size,
|
||||
'etag' => $fileInfo['etag']
|
||||
));
|
||||
|
||||
$encryptedFiles[] = $relPath;
|
||||
|
|
Loading…
Reference in a new issue