only set the values we need and make sure that we write the file info for both

the real file and the part file, because some information from the part file
might be needed later
This commit is contained in:
Bjoern Schiessle 2014-10-27 12:51:52 +01:00
parent f27b6b0ab8
commit 2af7256267

View file

@ -637,13 +637,17 @@ class Stream {
$path = Helper::stripPartialFileExtension($this->rawPath);
$fileInfo = array(
'mimetype' => $this->rootView->getMimeType($this->rawPath),
'encrypted' => true,
'size' => $this->size,
'unencrypted_size' => $this->unencryptedSize,
);
// set fileinfo
$this->rootView->putFileInfo($path, $fileInfo);
// if we write a part file we also store the unencrypted size for
// the part file so that it can be re-used later
$this->rootView->putFileInfo($this->rawPath, $fileInfo);
if ($path !== $this->rawPath) {
$this->rootView->putFileInfo($path, $fileInfo);
}
}