diff --git a/lib/filesystemview.php b/lib/filesystemview.php
index 89e0385fe9c6247ba6879200f34fff309df4a69b..39e47975b284094c0f8bbbb4f68ca787dafd8eb8 100644
--- a/lib/filesystemview.php
+++ b/lib/filesystemview.php
@@ -23,11 +23,11 @@
 
 class OC_FilesystemView {
 	private $fakeRoot='';
-	
+
 	public function __construct($root){
 		$this->fakeRoot=$root;
 	}
-	
+
 	public function getAbsolutePath($path){
 		if(!$path){
 			$path='/';
@@ -141,7 +141,7 @@ class OC_FilesystemView {
 		while (!feof($handle)) {
 			echo fread($handle, $chunkSize);
 			@ob_flush();
-			flush(); 
+			flush();
 		}
 		return $this->filesize($path);
 	}
@@ -282,7 +282,8 @@ class OC_FilesystemView {
 			if($source){
 				$extention=substr($path,strrpos($path,'.'));
 				$tmpFile=OC_Helper::tmpFile($extention);
-				return file_put_contents($tmpFile,$source);
+				file_put_contents($tmpFile,$source);
+				return $tmpFile;
 			}
 		}
 	}