This commit is contained in:
Arthur Schiwon 2012-04-13 23:02:29 +02:00
parent 74f0bebfc8
commit 9ef34cd831
1 changed files with 3 additions and 3 deletions

View File

@ -283,12 +283,12 @@ class OC_FilesystemView {
if(OC_Filesystem::isValidPath($path)){ if(OC_Filesystem::isValidPath($path)){
$source=$this->fopen($path,'r'); $source=$this->fopen($path,'r');
if($source){ if($source){
$extention=''; $extension='';
$extOffset=strpos($path,'.'); $extOffset=strpos($path,'.');
if($extOffset !== false) { if($extOffset !== false) {
$extention=substr($path,strrpos($path,'.')); $extension=substr($path,strrpos($path,'.'));
} }
$tmpFile=OC_Helper::tmpFile($extention); $tmpFile=OC_Helper::tmpFile($extension);
file_put_contents($tmpFile,$source); file_put_contents($tmpFile,$source);
return $tmpFile; return $tmpFile;
} }