don't fail on missing extension
This commit is contained in:
parent
b9bdad5165
commit
74f0bebfc8
|
@ -283,7 +283,11 @@ 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=substr($path,strrpos($path,'.'));
|
$extention='';
|
||||||
|
$extOffset=strpos($path,'.');
|
||||||
|
if($extOffset !== false) {
|
||||||
|
$extention=substr($path,strrpos($path,'.'));
|
||||||
|
}
|
||||||
$tmpFile=OC_Helper::tmpFile($extention);
|
$tmpFile=OC_Helper::tmpFile($extention);
|
||||||
file_put_contents($tmpFile,$source);
|
file_put_contents($tmpFile,$source);
|
||||||
return $tmpFile;
|
return $tmpFile;
|
||||||
|
|
Loading…
Reference in New Issue