fix for issue #1189, missing variables added
This commit is contained in:
parent
bb9cc227c2
commit
ef4e6f3d6c
|
@ -79,6 +79,7 @@ class Storage {
|
||||||
|
|
||||||
// create all parent folders
|
// create all parent folders
|
||||||
$info=pathinfo($filename);
|
$info=pathinfo($filename);
|
||||||
|
$versionsFolderName=\OCP\Config::getSystemValue('datadirectory').$users_view->getAbsolutePath('files_versions/');
|
||||||
if(!file_exists($versionsFolderName.'/'.$info['dirname'])) {
|
if(!file_exists($versionsFolderName.'/'.$info['dirname'])) {
|
||||||
mkdir($versionsFolderName.'/'.$info['dirname'], 0750, true);
|
mkdir($versionsFolderName.'/'.$info['dirname'], 0750, true);
|
||||||
}
|
}
|
||||||
|
@ -127,7 +128,8 @@ class Storage {
|
||||||
list($uid, $oldpath) = self::getUidAndFilename($oldpath);
|
list($uid, $oldpath) = self::getUidAndFilename($oldpath);
|
||||||
list($uidn, $newpath) = self::getUidAndFilename($newpath);
|
list($uidn, $newpath) = self::getUidAndFilename($newpath);
|
||||||
$versions_view = new \OC_FilesystemView('/'.$uid .'/files_versions');
|
$versions_view = new \OC_FilesystemView('/'.$uid .'/files_versions');
|
||||||
$files_view = new \OC_FilesystemView('/'.$uid .'/files');
|
$files_view = new \OC_FilesystemView('/'.$uid .'/files');
|
||||||
|
$abs_newpath = \OCP\Config::getSystemValue('datadirectory').$versions_view->getAbsolutePath('').$newpath;
|
||||||
|
|
||||||
if ( $files_view->is_dir($oldpath) && $versions_view->is_dir($oldpath) ) {
|
if ( $files_view->is_dir($oldpath) && $versions_view->is_dir($oldpath) ) {
|
||||||
$versions_view->rename($oldpath, $newpath);
|
$versions_view->rename($oldpath, $newpath);
|
||||||
|
|
Loading…
Reference in New Issue