diff options
author | Joas Schilling <coding@schilljs.com> | 2016-11-28 11:36:10 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-11-28 11:36:10 +0100 |
commit | d2ff6c569e93133026454150f71a7e8afd36b9e5 (patch) | |
tree | e778feacdd8e6d97b93b101cc11336675411022b /lib/private/legacy | |
parent | ca7b9e54903286c63031739fa31ecbd33084d7b4 (diff) | |
download | nextcloud-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.php | 3 |
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); |