use OC files API to create missing directory which should handle special chars in every environment correctly
This commit is contained in:
parent
435e63b5ee
commit
d314729cea
1 changed files with 7 additions and 4 deletions
|
@ -110,10 +110,13 @@ class Storage {
|
|||
}
|
||||
|
||||
// create all parent folders
|
||||
$info=pathinfo($filename);
|
||||
$versionsFolderName=$versions_view->getLocalFolder('');
|
||||
if(!file_exists($versionsFolderName.'/'.$info['dirname'])) {
|
||||
mkdir($versionsFolderName.'/'.$info['dirname'], 0750, true);
|
||||
$dirname= \OC_Filesystem::normalizePath(pathinfo($filename, PATHINFO_DIRNAME));
|
||||
$dirParts = explode('/', $dirname);
|
||||
foreach ($dirParts as $part) {
|
||||
$dir = $dir.'/'.$part;
|
||||
if(!$versions_view->file_exists($dir)) {
|
||||
$versions_view->mkdir($dir);
|
||||
}
|
||||
}
|
||||
|
||||
$versionsSize = self::getVersionsSize($uid);
|
||||
|
|
Loading…
Reference in a new issue