Skip to content

Commit

Permalink
After writing a file in copyr the folder size shall be corrected - th…
Browse files Browse the repository at this point in the history
…is is necessary for objectstore acceptance tests
  • Loading branch information
DeepDiver1975 committed May 3, 2018
1 parent 05a5265 commit 858906f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/private/legacy/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,15 @@ public static function copyr($source, \OCP\Files\Folder $target) {
}
$child = $target->newFile($file);
\stream_copy_to_stream($sourceFileHandle, $child->fopen('w'));
\fclose($child);
\fclose($sourceFileHandle);

// update cache sizes
$cache = $target->getStorage()->getCache();
if ($cache instanceof \OC\Files\Cache\Cache) {
$cache->correctFolderSize($child->getInternalPath());
}

}
}
}
Expand Down

0 comments on commit 858906f

Please sign in to comment.