aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib/versions.php
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-03-08 11:27:25 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-03-08 11:27:25 +0100
commit8d26400cb5427763b0562da8799bea52f4eae21e (patch)
tree2c892bd70c3c2563048c6a7cad76cedb94c213ed /apps/files_versions/lib/versions.php
parent45869afa5ac718e11c3d2e3bccdb501a022cfc24 (diff)
downloadnextcloud-server-8d26400cb5427763b0562da8799bea52f4eae21e.tar.gz
nextcloud-server-8d26400cb5427763b0562da8799bea52f4eae21e.zip
remove some debug output; move code to the right function
Diffstat (limited to 'apps/files_versions/lib/versions.php')
-rw-r--r--apps/files_versions/lib/versions.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 79b16f2586f..20611c61ec7 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -82,6 +82,14 @@ class Storage {
*/
public static function store($filename) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
+
+ // if the file gets streamed we need to remove the .part extension
+ // to get the right target
+ $ext = pathinfo($filename, PATHINFO_EXTENSION);
+ if ($ext === 'part') {
+ $filename = substr($filename, 0, strlen($filename)-5);
+ }
+
list($uid, $filename) = self::getUidAndFilename($filename);
$files_view = new \OC\Files\View('/'.$uid .'/files');