don't fail on missing extension

remotes/origin/stable4
Arthur Schiwon 13 years ago
parent b9bdad5165
commit 74f0bebfc8
  1. 6
      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;

Loading…
Cancel
Save