Skip to content
Snippets Groups Projects
Commit dbb93074 authored by Joas Schilling's avatar Joas Schilling
Browse files

Fix endless loop on windows servers

Directory seperator is \ on windows
However we can just check for path != dirname(path) because that is
the same for '' (empty string), '.' and DIRECTORY_SEPARATOR on all OS
parent 31bf2d4b
Branches
No related tags found
No related merge requests found
...@@ -125,7 +125,7 @@ class Helper { ...@@ -125,7 +125,7 @@ class Helper {
$ids = array(); $ids = array();
while ($path !== '' && $path !== '.' && $path !== '/') { while ($path !== dirname($path)) {
$info = $ownerView->getFileInfo($path); $info = $ownerView->getFileInfo($path);
if ($info instanceof \OC\Files\FileInfo) { if ($info instanceof \OC\Files\FileInfo) {
$ids[] = $info['fileid']; $ids[] = $info['fileid'];
......
...@@ -38,7 +38,7 @@ class Shared_Updater { ...@@ -38,7 +38,7 @@ class Shared_Updater {
\OC\Files\Filesystem::initMountPoints($user); \OC\Files\Filesystem::initMountPoints($user);
$view = new \OC\Files\View('/' . $user); $view = new \OC\Files\View('/' . $user);
if ($view->file_exists($path)) { if ($view->file_exists($path)) {
while ($path !== '/') { while ($path !== dirname($path)) {
$etag = $view->getETag($path); $etag = $view->getETag($path);
$view->putFileInfo($path, array('etag' => $etag)); $view->putFileInfo($path, array('etag' => $etag));
$path = dirname($path); $path = dirname($path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment