diff --git a/lib/filesystemview.php b/lib/filesystemview.php index 9d530c7ad6..3045fc8b88 100644 --- a/lib/filesystemview.php +++ b/lib/filesystemview.php @@ -283,7 +283,11 @@ class OC_FilesystemView { if(OC_Filesystem::isValidPath($path)){ $source=$this->fopen($path,'r'); if($source){ - $extention=substr($path,strrpos($path,'.')); + $extention=''; + $extOffset=strpos($path,'.'); + if($extOffset !== false) { + $extention=substr($path,strrpos($path,'.')); + } $tmpFile=OC_Helper::tmpFile($extention); file_put_contents($tmpFile,$source); return $tmpFile;