aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-11-28 11:36:10 +0100
committerJoas Schilling <coding@schilljs.com>2016-11-28 11:36:10 +0100
commitd2ff6c569e93133026454150f71a7e8afd36b9e5 (patch)
treee778feacdd8e6d97b93b101cc11336675411022b /lib/private/legacy
parentca7b9e54903286c63031739fa31ecbd33084d7b4 (diff)
downloadnextcloud-server-d2ff6c569e93133026454150f71a7e8afd36b9e5.tar.gz
nextcloud-server-d2ff6c569e93133026454150f71a7e8afd36b9e5.zip
Keep the filemtime for files when downloading them in a zip/tar
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/files.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/legacy/files.php b/lib/private/legacy/files.php
index 064fa9e1d7a..b6c6857a1bf 100644
--- a/lib/private/legacy/files.php
+++ b/lib/private/legacy/files.php
@@ -153,8 +153,9 @@ class OC_Files {
$file = $dir . '/' . $file;
if (\OC\Files\Filesystem::is_file($file)) {
$fileSize = \OC\Files\Filesystem::filesize($file);
+ $fileTime = \OC\Files\Filesystem::filemtime($file);
$fh = \OC\Files\Filesystem::fopen($file, 'r');
- $streamer->addFileFromStream($fh, basename($file), $fileSize);
+ $streamer->addFileFromStream($fh, basename($file), $fileSize, $fileTime);
fclose($fh);
} elseif (\OC\Files\Filesystem::is_dir($file)) {
$streamer->addDirRecursive($file);